diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2013-05-07 19:29:05 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2013-05-07 19:29:05 +0000 |
commit | 5a107a0f0cdf9686c51db1f278ed2c93927d0069 (patch) | |
tree | 28fa1b57a153d5c79ac7a0f108dad081b3a9ddf8 /gcc/lra-eliminations.c | |
parent | 3f5783ea1b0ca56bc18fa90f602a7a0f825b379a (diff) | |
download | gcc-5a107a0f0cdf9686c51db1f278ed2c93927d0069.zip gcc-5a107a0f0cdf9686c51db1f278ed2c93927d0069.tar.gz gcc-5a107a0f0cdf9686c51db1f278ed2c93927d0069.tar.bz2 |
ira.c (update_equiv_regs): Add insn having equiv memory even if it is not lhs of the insn.
2013-05-07 Vladimir Makarov <vmakarov@redhat.com>
* ira.c (update_equiv_regs): Add insn having equiv memory even if
it is not lhs of the insn.
(setup_reg_equiv): Remove insn having equiv memory which it is not
lhs of the insn.
* lra-constraints.c (process_address): Try to improve generation
code for address base + disp.
(lra_constraints): Make correct the code for checking insn setting
up backward equivalence. Remove insn only if it is in the init
insn list.
* lra-eliminations.c (update_reg_eliminate): Change return value.
(lra_eliminate): Use the result.
From-SVN: r198695
Diffstat (limited to 'gcc/lra-eliminations.c')
-rw-r--r-- | gcc/lra-eliminations.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c index 24a0dc7..a59ab6e 100644 --- a/gcc/lra-eliminations.c +++ b/gcc/lra-eliminations.c @@ -1042,11 +1042,12 @@ spill_pseudos (HARD_REG_SET set) registers. Spill pseudos assigned to registers which became uneliminable, update LRA_NO_ALLOC_REGS and ELIMINABLE_REG_SET. Add insns to INSNS_WITH_CHANGED_OFFSETS containing eliminable hard - registers whose offsets should be changed. */ -static void + registers whose offsets should be changed. Return true if any + elimination offset changed. */ +static bool update_reg_eliminate (bitmap insns_with_changed_offsets) { - bool prev; + bool prev, result; struct elim_table *ep, *ep1; HARD_REG_SET temp_hard_reg_set; @@ -1122,6 +1123,7 @@ update_reg_eliminate (bitmap insns_with_changed_offsets) AND_COMPL_HARD_REG_SET (eliminable_regset, temp_hard_reg_set); spill_pseudos (temp_hard_reg_set); setup_elimination_map (); + result = false; for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++) if (elimination_map[ep->from] == ep && ep->previous_offset != ep->offset) { @@ -1132,7 +1134,9 @@ update_reg_eliminate (bitmap insns_with_changed_offsets) changed. */ lra_update_reg_val_offset (lra_reg_info[ep->from].val, ep->offset - ep->previous_offset); + result = true; } + return result; } /* Initialize the table of hard registers to eliminate. @@ -1273,12 +1277,8 @@ lra_eliminate (bool final_p) bitmap_ior_into (&insns_with_changed_offsets, &lra_reg_info[ep->from].insn_bitmap); } - else - { - update_reg_eliminate (&insns_with_changed_offsets); - if (bitmap_empty_p (&insns_with_changed_offsets)) - goto lra_eliminate_done; - } + else if (! update_reg_eliminate (&insns_with_changed_offsets)) + goto lra_eliminate_done; if (lra_dump_file != NULL) { fprintf (lra_dump_file, "New elimination table:\n"); |