summaryrefslogtreecommitdiff
path: root/gcc/lra-assigns.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-25 16:54:14 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-25 16:54:14 +0000
commitbf619f3579483e49e5b9b6c8efd679621109efa2 (patch)
tree170ede345b8f39e46ddcf68b87e9602ae61772e5 /gcc/lra-assigns.c
parentff219786d22364d3567d419521caccc9b398cb39 (diff)
downloadgcc-bf619f3579483e49e5b9b6c8efd679621109efa2.tar.gz
2012-10-25 Vladimir Makarov <vmakarov@redhat.com>
* lra-assigns.c (assign_by_spills): Add non-reload pseudos assigned to hard register to changed_pseudo_bitmap. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192817 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-assigns.c')
-rw-r--r--gcc/lra-assigns.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c
index b957563716f..bcf26afcf29 100644
--- a/gcc/lra-assigns.c
+++ b/gcc/lra-assigns.c
@@ -1159,6 +1159,7 @@ assign_by_spills (void)
bitmap_head non_reload_pseudos;
unsigned int u;
bitmap_iterator bi;
+ bool reload_p;
int max_regno = max_reg_num ();
for (n = 0, i = lra_constraint_new_regno_start; i < max_regno; i++)
@@ -1193,12 +1194,12 @@ assign_by_spills (void)
lra_reg_info[regno].freq, regno_assign_info[regno].first,
regno_assign_info[regno_assign_info[regno].first].freq);
hard_regno = find_hard_regno_for (regno, &cost, -1);
- if (hard_regno < 0
- && ! bitmap_bit_p (&non_reload_pseudos, regno))
+ reload_p = ! bitmap_bit_p (&non_reload_pseudos, regno);
+ if (hard_regno < 0 && reload_p)
hard_regno = spill_for (regno, &all_spilled_pseudos);
if (hard_regno < 0)
{
- if (! bitmap_bit_p (&non_reload_pseudos, regno))
+ if (reload_p)
sorted_pseudos[nfails++] = regno;
}
else
@@ -1207,6 +1208,11 @@ assign_by_spills (void)
pass. Indicate that it is no longer spilled. */
bitmap_clear_bit (&all_spilled_pseudos, regno);
assign_hard_regno (hard_regno, regno);
+ if (! reload_p)
+ /* As non-reload pseudo assignment is changed we
+ should reconsider insns referring for the
+ pseudo. */
+ bitmap_set_bit (&changed_pseudo_bitmap, regno);
}
}
if (nfails == 0)
@@ -1308,9 +1314,9 @@ assign_by_spills (void)
if (hard_regno >= 0)
{
assign_hard_regno (hard_regno, regno);
- /* We change allocation for non-reload pseudo on this
- iteration -- mark the pseudo for invalidation of used
- alternatives of insns containing the pseudo. */
+ /* We change allocation for non-reload pseudo on this
+ iteration -- mark the pseudo for invalidation of used
+ alternatives of insns containing the pseudo. */
bitmap_set_bit (&changed_pseudo_bitmap, regno);
}
}