Commit bc532bf7 by Steve Christiansen Committed by Richard Henderson

* loop.c (loop_regs_scan): Don't invalidate PIC register.

From-SVN: r46817
parent 2a2be25e
2001-11-06 Steve Christiansen <smc@us.ibm.com>
* loop.c (loop_regs_scan): Don't invalidate PIC register.
2001-11-06 Eric Christopher <echristo@redhat.com> 2001-11-06 Eric Christopher <echristo@redhat.com>
* config/mips/mips.md(movdf_internal2): Add constraints for float * config/mips/mips.md(movdf_internal2): Add constraints for float
......
...@@ -8819,11 +8819,18 @@ loop_regs_scan (loop, extra_size) ...@@ -8819,11 +8819,18 @@ loop_regs_scan (loop, extra_size)
memset (last_set, 0, regs->num * sizeof (rtx)); memset (last_set, 0, regs->num * sizeof (rtx));
} }
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) /* Invalidate all hard registers clobbered by calls. With one exception:
{ a call-clobbered PIC register is still function-invariant for our
regs->array[i].may_not_optimize = 1; purposes, since we can hoist any PIC calculations out of the loop.
regs->array[i].set_in_loop = 1; Thus the call to rtx_varies_p. */
} if (LOOP_INFO (loop)->has_call)
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)
&& rtx_varies_p (gen_rtx_REG (Pmode, i), /*for_alias=*/1))
{
regs->array[i].may_not_optimize = 1;
regs->array[i].set_in_loop = 1;
}
#ifdef AVOID_CCMODE_COPIES #ifdef AVOID_CCMODE_COPIES
/* Don't try to move insns which set CC registers if we should not /* Don't try to move insns which set CC registers if we should not
......
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