aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-assigns.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-assigns.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-assigns.c')
-rw-r--r--gcc/lra-assigns.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c
index b204513..3f8a899 100644
--- a/gcc/lra-assigns.c
+++ b/gcc/lra-assigns.c
@@ -448,7 +448,7 @@ find_hard_regno_for (int regno, int *cost, int try_only_hard_regno)
int hr, conflict_hr, nregs;
enum machine_mode biggest_mode;
unsigned int k, conflict_regno;
- int val, biggest_nregs, nregs_diff;
+ int offset, val, biggest_nregs, nregs_diff;
enum reg_class rclass;
bitmap_iterator bi;
bool *rclass_intersect_p;
@@ -508,9 +508,10 @@ find_hard_regno_for (int regno, int *cost, int try_only_hard_regno)
#endif
sparseset_clear_bit (conflict_reload_and_inheritance_pseudos, regno);
val = lra_reg_info[regno].val;
+ offset = lra_reg_info[regno].offset;
CLEAR_HARD_REG_SET (impossible_start_hard_regs);
EXECUTE_IF_SET_IN_SPARSESET (live_range_hard_reg_pseudos, conflict_regno)
- if (val == lra_reg_info[conflict_regno].val)
+ if (lra_reg_val_equal_p (conflict_regno, val, offset))
{
conflict_hr = live_pseudos_reg_renumber[conflict_regno];
nregs = (hard_regno_nregs[conflict_hr]
@@ -538,7 +539,7 @@ find_hard_regno_for (int regno, int *cost, int try_only_hard_regno)
}
EXECUTE_IF_SET_IN_SPARSESET (conflict_reload_and_inheritance_pseudos,
conflict_regno)
- if (val != lra_reg_info[conflict_regno].val)
+ if (!lra_reg_val_equal_p (conflict_regno, val, offset))
{
lra_assert (live_pseudos_reg_renumber[conflict_regno] < 0);
if ((hard_regno
@@ -1007,7 +1008,7 @@ setup_live_pseudos_and_spill_after_risky_transforms (bitmap
{
int p, i, j, n, regno, hard_regno;
unsigned int k, conflict_regno;
- int val;
+ int val, offset;
HARD_REG_SET conflict_set;
enum machine_mode mode;
lra_live_range_t r;
@@ -1050,8 +1051,9 @@ setup_live_pseudos_and_spill_after_risky_transforms (bitmap
COPY_HARD_REG_SET (conflict_set, lra_no_alloc_regs);
IOR_HARD_REG_SET (conflict_set, lra_reg_info[regno].conflict_hard_regs);
val = lra_reg_info[regno].val;
+ offset = lra_reg_info[regno].offset;
EXECUTE_IF_SET_IN_SPARSESET (live_range_hard_reg_pseudos, conflict_regno)
- if (val != lra_reg_info[conflict_regno].val
+ if (!lra_reg_val_equal_p (conflict_regno, val, offset)
/* If it is multi-register pseudos they should start on
the same hard register. */
|| hard_regno != reg_renumber[conflict_regno])