Commit 2dd6af4e by Eric Botcazou Committed by Eric Botcazou

re PR bootstrap/71435 (sparc bootstrap failure since r235625)

	PR bootstrap/71435
	* reload1.c (reload): Pass 0 to finish_spills when called because
	update_eliminables_and_spill returns true and remove did_spill.
	(finish_spills): Adjust comment and document GLOBAL parameter.

From-SVN: r237571
parent 2b357a2b
2016-06-18 Eric Botcazou <ebotcazou@adacore.com>
PR bootstrap/71435
* reload1.c (reload): Pass 0 to finish_spills when called because
update_eliminables_and_spill returns true and remove did_spill.
(finish_spills): Adjust comment and document GLOBAL parameter.
2016-06-17 DJ Delorie <dj@redhat.com> 2016-06-17 DJ Delorie <dj@redhat.com>
PR target/71338 PR target/71338
......
...@@ -897,7 +897,6 @@ reload (rtx_insn *first, int global) ...@@ -897,7 +897,6 @@ reload (rtx_insn *first, int global)
for (;;) for (;;)
{ {
int something_changed; int something_changed;
int did_spill;
HOST_WIDE_INT starting_frame_size; HOST_WIDE_INT starting_frame_size;
starting_frame_size = get_frame_size (); starting_frame_size = get_frame_size ();
...@@ -982,7 +981,7 @@ reload (rtx_insn *first, int global) ...@@ -982,7 +981,7 @@ reload (rtx_insn *first, int global)
if (something_was_spilled || starting_frame_size != get_frame_size ()) if (something_was_spilled || starting_frame_size != get_frame_size ())
{ {
if (update_eliminables_and_spill ()) if (update_eliminables_and_spill ())
finish_spills (global); finish_spills (0);
continue; continue;
} }
...@@ -1001,8 +1000,6 @@ reload (rtx_insn *first, int global) ...@@ -1001,8 +1000,6 @@ reload (rtx_insn *first, int global)
is used. */ is used. */
CLEAR_REG_SET (&spilled_pseudos); CLEAR_REG_SET (&spilled_pseudos);
did_spill = 0;
something_changed = 0; something_changed = 0;
/* If we allocated any new memory locations, make another pass /* If we allocated any new memory locations, make another pass
...@@ -1019,7 +1016,7 @@ reload (rtx_insn *first, int global) ...@@ -1019,7 +1016,7 @@ reload (rtx_insn *first, int global)
if (update_eliminables_and_spill ()) if (update_eliminables_and_spill ())
{ {
did_spill = 1; finish_spills (0);
something_changed = 1; something_changed = 1;
} }
else else
...@@ -1027,11 +1024,10 @@ reload (rtx_insn *first, int global) ...@@ -1027,11 +1024,10 @@ reload (rtx_insn *first, int global)
select_reload_regs (); select_reload_regs ();
if (failure) if (failure)
goto failed; goto failed;
if (insns_need_reload)
something_changed |= finish_spills (global);
} }
if (insns_need_reload != 0 || did_spill)
something_changed |= finish_spills (global);
if (! something_changed) if (! something_changed)
break; break;
...@@ -4281,10 +4277,13 @@ spill_hard_reg (unsigned int regno, int cant_eliminate) ...@@ -4281,10 +4277,13 @@ spill_hard_reg (unsigned int regno, int cant_eliminate)
SET_REGNO_REG_SET (&spilled_pseudos, i); SET_REGNO_REG_SET (&spilled_pseudos, i);
} }
/* After find_reload_regs has been run for all insn that need reloads, /* After spill_hard_reg was called and/or find_reload_regs was run for all
and/or spill_hard_regs was called, this function is used to actually insns that need reloads, this function is used to actually spill pseudo
spill pseudo registers and try to reallocate them. It also sets up the registers and try to reallocate them. It also sets up the spill_regs
spill_regs array for use by choose_reload_regs. */ array for use by choose_reload_regs.
GLOBAL nonzero means we should attempt to reallocate any pseudo registers
that we displace from hard registers. */
static int static int
finish_spills (int global) finish_spills (int global)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment