summaryrefslogtreecommitdiff
path: root/gcc/lra.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lra.c')
-rw-r--r--gcc/lra.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/lra.c b/gcc/lra.c
index e7fa888df57..3ea4a6507d2 100644
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -2295,11 +2295,20 @@ lra (FILE *f)
lra_assign ();
else
{
- /* Do coalescing only for regular algorithms. */
- if (! lra_assign () && lra_coalesce ())
- live_p = false;
+ bool spill_p = !lra_assign ();
+
if (lra_undo_inheritance ())
live_p = false;
+ if (spill_p)
+ {
+ if (! live_p)
+ {
+ lra_create_live_ranges (true);
+ live_p = true;
+ }
+ if (lra_coalesce ())
+ live_p = false;
+ }
if (! live_p)
lra_clear_live_ranges ();
}