Commit 4ab51fb5 by J"orn Rennecke Committed by Joern Rennecke

reload1.c (reload): Only spill eliminable register with multiple adjacent…

reload1.c (reload): Only spill eliminable register with multiple adjacent elimination alternatives...

	* reload1.c (reload): Only spill eliminable register with multiple
	adjacent elimination alternatives if all alternatives fail.

From-SVN: r78430
parent e1471c91
2004-02-25 J"orn Rennecke <joern.rennecke@superh.com>
* reload1.c (reload): Only spill eliminable register with multiple
adjacent elimination alternatives if all alternatives fail.
2004-02-25 Richard Earnshaw <rearnsha@arm.com> 2004-02-25 Richard Earnshaw <rearnsha@arm.com>
* arm.c (arm_legitimate_index_p): For QImode the range of an offset * arm.c (arm_legitimate_index_p): For QImode the range of an offset
......
...@@ -849,9 +849,22 @@ reload (rtx first, int global) ...@@ -849,9 +849,22 @@ reload (rtx first, int global)
/* Spill any hard regs that we know we can't eliminate. */ /* Spill any hard regs that we know we can't eliminate. */
CLEAR_HARD_REG_SET (used_spill_regs); CLEAR_HARD_REG_SET (used_spill_regs);
for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++) /* There can be multiple ways to eliminate a register;
if (! ep->can_eliminate) they should be listed adjacently.
spill_hard_reg (ep->from, 1); Elimination for any register fails only if all possible ways fail. */
for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; )
{
int from = ep->from;
int can_eliminate = 0;
do
{
can_eliminate |= ep->can_eliminate;
ep++;
}
while (ep < &reg_eliminate[NUM_ELIMINABLE_REGS] && ep->from == from);
if (! can_eliminate)
spill_hard_reg (from, 1);
}
#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM #if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
if (frame_pointer_needed) if (frame_pointer_needed)
......
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