diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2014-10-10 08:09:39 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2014-10-10 08:09:39 +0000 |
commit | bdf13188c06c3109d64368a865954816fafae567 (patch) | |
tree | 12f00c25a868f7e02a88fbbb35b5ea960bd44fbf /gcc/lra-assigns.c | |
parent | a6c631732fc35dc6948e7a1810b78eef3a11af97 (diff) | |
download | gcc-bdf13188c06c3109d64368a865954816fafae567.zip gcc-bdf13188c06c3109d64368a865954816fafae567.tar.gz gcc-bdf13188c06c3109d64368a865954816fafae567.tar.bz2 |
* lra-assigns.c (assign_by_spills): Error out on spill failure.
From-SVN: r216059
Diffstat (limited to 'gcc/lra-assigns.c')
-rw-r--r-- | gcc/lra-assigns.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c index c7164cd..a6745fc 100644 --- a/gcc/lra-assigns.c +++ b/gcc/lra-assigns.c @@ -1286,10 +1286,9 @@ assign_by_spills (void) break; if (iter > 0) { - /* We did not assign hard regs to reload pseudos after two - iteration. It means something is wrong with asm insn - constraints. Report it. */ - bool asm_p = false; + /* We did not assign hard regs to reload pseudos after two iterations. + Either it's an asm and something is wrong with the constraints, or + we have run out of spill registers; error out in either case. */ bitmap_head failed_reload_insns; bitmap_initialize (&failed_reload_insns, ®_obstack); @@ -1299,7 +1298,7 @@ assign_by_spills (void) bitmap_ior_into (&failed_reload_insns, &lra_reg_info[regno].insn_bitmap); /* Assign an arbitrary hard register of regno class to - avoid further trouble with the asm insns. */ + avoid further trouble with this insn. */ bitmap_clear_bit (&all_spilled_pseudos, regno); assign_hard_regno (ira_class_hard_regs[regno_allocno_class_array[regno]][0], @@ -1310,7 +1309,6 @@ assign_by_spills (void) insn = lra_insn_recog_data[u]->insn; if (asm_noperands (PATTERN (insn)) >= 0) { - asm_p = true; error_for_asm (insn, "%<asm%> operand has impossible constraints"); /* Avoid further trouble with this insn. @@ -1331,8 +1329,12 @@ assign_by_spills (void) lra_set_insn_deleted (insn); } } + else + { + error ("unable to find a register to spill"); + fatal_insn ("this is the insn:", insn); + } } - lra_assert (asm_p); break; } /* This is a very rare event. We can not assign a hard register |