summaryrefslogtreecommitdiff
path: root/gcc/lra-eliminations.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-23 17:38:59 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-23 17:38:59 +0000
commita10644908ca71b6974af31acb8fa88a512d854c4 (patch)
tree17afa8226cdc7da00b678c19aa87047ca1ddfd18 /gcc/lra-eliminations.c
parent5e1781b68cf0eb85143c9d56d39c32d53ef83c5b (diff)
downloadgcc-a10644908ca71b6974af31acb8fa88a512d854c4.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198204 138bc75d-0d04-0410-961f-82ee72b054a4
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 27a5d7560c5..5aa0cb82ba2 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.