aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-eliminations.c
diff options
context:
space:
mode:
authorShiva Chen <shiva0217@gmail.com>2013-04-23 17:38:59 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2013-04-23 17:38:59 +0000
commitd70a81dddc916c55892c5b73bed2138b71bd5945 (patch)
tree17afa8226cdc7da00b678c19aa87047ca1ddfd18 /gcc/lra-eliminations.c
parentb894a1f3464f4f56ce2318c019ec3855794f7118 (diff)
downloadgcc-d70a81dddc916c55892c5b73bed2138b71bd5945.zip
gcc-d70a81dddc916c55892c5b73bed2138b71bd5945.tar.gz
gcc-d70a81dddc916c55892c5b73bed2138b71bd5945.tar.bz2
lra-assigns.c (find_hard_regno_for): Use lra_reg_val_equal_p to check the register content is equal or not.
2013-04-23 Shiva Chen <shiva0217@gmail.com> * lra-assigns.c (find_hard_regno_for): Use lra_reg_val_equal_p to check the register content is equal or not. * lra-constraints.c (match_reload): Use lra_assign_reg_val to assign register content record. * lra-eliminations.c (update_reg_eliminate): Use lra_update_reg_val_offset to update register content offset. * lra-int.h (struct lra_reg): Add offset member. (lra_reg_val_equal_p): New static inline function. (lra_update_reg_val_offset): New static inline function. (lra_assign_reg_val): New static inline function. * lra.c (lra_create_new_reg): Use lra_assign_reg_val to assign register content record. (initialize_lra_reg_info_element): Initial offset to zero. From-SVN: r198204
Diffstat (limited to 'gcc/lra-eliminations.c')
-rw-r--r--gcc/lra-eliminations.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c
index 27a5d75..5aa0cb8 100644
--- a/gcc/lra-eliminations.c
+++ b/gcc/lra-eliminations.c
@@ -1124,8 +1124,15 @@ update_reg_eliminate (bitmap insns_with_changed_offsets)
setup_elimination_map ();
for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++)
if (elimination_map[ep->from] == ep && ep->previous_offset != ep->offset)
- bitmap_ior_into (insns_with_changed_offsets,
- &lra_reg_info[ep->from].insn_bitmap);
+ {
+ bitmap_ior_into (insns_with_changed_offsets,
+ &lra_reg_info[ep->from].insn_bitmap);
+
+ /* Update offset when the eliminate offset have been
+ changed. */
+ lra_update_reg_val_offset (lra_reg_info[ep->from].val,
+ ep->offset - ep->previous_offset);
+ }
}
/* Initialize the table of hard registers to eliminate.