flow.c (mark_regs_live_at_end, [...]): Only give FRAME_POINTER_REGNUM and HARD_FRAME_POINTER_REGNUM special treatment...
* flow.c (mark_regs_live_at_end, insn_dead_p, mark_set_1, mark_used_regs): Only give FRAME_POINTER_REGNUM and HARD_FRAME_POINTER_REGNUM special treatment if reload hasn't run or the frame pointer is needed. * haifa-sched.c (attach_deaths): Likewise. * sched.c (attach_deaths): Likewise. From-SVN: r27276
This commit is contained in:
parent
b2d352ba5a
commit
e4b8a413b1
@ -1,3 +1,12 @@
|
|||||||
|
Mon May 31 11:40:20 EDT 1999 John Wehle (john@feith.com)
|
||||||
|
|
||||||
|
* flow.c (mark_regs_live_at_end, insn_dead_p,
|
||||||
|
mark_set_1, mark_used_regs): Only give FRAME_POINTER_REGNUM
|
||||||
|
and HARD_FRAME_POINTER_REGNUM special treatment if reload
|
||||||
|
hasn't run or the frame pointer is needed.
|
||||||
|
* haifa-sched.c (attach_deaths): Likewise.
|
||||||
|
* sched.c (attach_deaths): Likewise.
|
||||||
|
|
||||||
Mon May 31 00:46:17 1999 Jeffrey A Law (law@cygnus.com)
|
Mon May 31 00:46:17 1999 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
* configure.in (native gas tests): Search for an assembler in the
|
* configure.in (native gas tests): Search for an assembler in the
|
||||||
|
33
gcc/flow.c
33
gcc/flow.c
@ -2272,11 +2272,14 @@ mark_regs_live_at_end (set)
|
|||||||
we end up eliminating it, it will be removed from the live list
|
we end up eliminating it, it will be removed from the live list
|
||||||
of each basic block by reload. */
|
of each basic block by reload. */
|
||||||
|
|
||||||
SET_REGNO_REG_SET (set, FRAME_POINTER_REGNUM);
|
if (! reload_completed || frame_pointer_needed)
|
||||||
|
{
|
||||||
|
SET_REGNO_REG_SET (set, FRAME_POINTER_REGNUM);
|
||||||
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
|
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
|
||||||
/* If they are different, also mark the hard frame pointer as live */
|
/* If they are different, also mark the hard frame pointer as live */
|
||||||
SET_REGNO_REG_SET (set, HARD_FRAME_POINTER_REGNUM);
|
SET_REGNO_REG_SET (set, HARD_FRAME_POINTER_REGNUM);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/* Mark all global registers, and all registers used by the epilogue
|
/* Mark all global registers, and all registers used by the epilogue
|
||||||
as being live at the end of the function since they may be
|
as being live at the end of the function since they may be
|
||||||
@ -2957,9 +2960,11 @@ insn_dead_p (x, needed, call_ok, notes)
|
|||||||
/* Don't delete insns to set global regs. */
|
/* Don't delete insns to set global regs. */
|
||||||
if ((regno < FIRST_PSEUDO_REGISTER && global_regs[regno])
|
if ((regno < FIRST_PSEUDO_REGISTER && global_regs[regno])
|
||||||
/* Make sure insns to set frame pointer aren't deleted. */
|
/* Make sure insns to set frame pointer aren't deleted. */
|
||||||
|| regno == FRAME_POINTER_REGNUM
|
|| (regno == FRAME_POINTER_REGNUM
|
||||||
|
&& (! reload_completed || frame_pointer_needed))
|
||||||
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
|
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
|
||||||
|| regno == HARD_FRAME_POINTER_REGNUM
|
|| (regno == HARD_FRAME_POINTER_REGNUM
|
||||||
|
&& (! reload_completed || frame_pointer_needed))
|
||||||
#endif
|
#endif
|
||||||
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|
||||||
/* Make sure insns to set arg pointer are never deleted
|
/* Make sure insns to set arg pointer are never deleted
|
||||||
@ -3268,9 +3273,11 @@ mark_set_1 (needed, dead, x, insn, significant)
|
|||||||
mem_set_list = gen_rtx_EXPR_LIST (VOIDmode, reg, mem_set_list);
|
mem_set_list = gen_rtx_EXPR_LIST (VOIDmode, reg, mem_set_list);
|
||||||
|
|
||||||
if (GET_CODE (reg) == REG
|
if (GET_CODE (reg) == REG
|
||||||
&& (regno = REGNO (reg), regno != FRAME_POINTER_REGNUM)
|
&& (regno = REGNO (reg), ! (regno == FRAME_POINTER_REGNUM
|
||||||
|
&& (! reload_completed || frame_pointer_needed)))
|
||||||
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
|
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
|
||||||
&& regno != HARD_FRAME_POINTER_REGNUM
|
&& ! (regno == HARD_FRAME_POINTER_REGNUM
|
||||||
|
&& (! reload_completed || frame_pointer_needed))
|
||||||
#endif
|
#endif
|
||||||
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|
||||||
&& ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
|
&& ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
|
||||||
@ -3728,12 +3735,14 @@ mark_used_regs (needed, live, x, final, insn)
|
|||||||
nothing below can be necessary, so waste no more time. */
|
nothing below can be necessary, so waste no more time. */
|
||||||
if (regno == STACK_POINTER_REGNUM
|
if (regno == STACK_POINTER_REGNUM
|
||||||
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
|
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
|
||||||
|| regno == HARD_FRAME_POINTER_REGNUM
|
|| (regno == HARD_FRAME_POINTER_REGNUM
|
||||||
|
&& (! reload_completed || frame_pointer_needed))
|
||||||
#endif
|
#endif
|
||||||
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|
||||||
|| (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
|
|| (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
|
||||||
#endif
|
#endif
|
||||||
|| regno == FRAME_POINTER_REGNUM)
|
|| (regno == FRAME_POINTER_REGNUM
|
||||||
|
&& (! reload_completed || frame_pointer_needed)))
|
||||||
{
|
{
|
||||||
/* If this is a register we are going to try to eliminate,
|
/* If this is a register we are going to try to eliminate,
|
||||||
don't mark it live here. If we are successful in
|
don't mark it live here. If we are successful in
|
||||||
@ -3909,9 +3918,11 @@ mark_used_regs (needed, live, x, final, insn)
|
|||||||
if ((GET_CODE (testreg) == PARALLEL
|
if ((GET_CODE (testreg) == PARALLEL
|
||||||
&& GET_MODE (testreg) == BLKmode)
|
&& GET_MODE (testreg) == BLKmode)
|
||||||
|| (GET_CODE (testreg) == REG
|
|| (GET_CODE (testreg) == REG
|
||||||
&& (regno = REGNO (testreg), regno != FRAME_POINTER_REGNUM)
|
&& (regno = REGNO (testreg), ! (regno == FRAME_POINTER_REGNUM
|
||||||
|
&& (! reload_completed || frame_pointer_needed)))
|
||||||
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
|
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
|
||||||
&& regno != HARD_FRAME_POINTER_REGNUM
|
&& ! (regno == HARD_FRAME_POINTER_REGNUM
|
||||||
|
&& (! reload_completed || frame_pointer_needed))
|
||||||
#endif
|
#endif
|
||||||
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
|
||||||
&& ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
|
&& ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
|
||||||
|
@ -4630,12 +4630,15 @@ attach_deaths (x, insn, set_p)
|
|||||||
|
|
||||||
if (regno >= FIRST_PSEUDO_REGISTER || ! global_regs[regno])
|
if (regno >= FIRST_PSEUDO_REGISTER || ! global_regs[regno])
|
||||||
{
|
{
|
||||||
/* Never add REG_DEAD notes for the FRAME_POINTER_REGNUM or the
|
/* Never add REG_DEAD notes for STACK_POINTER_REGNUM
|
||||||
STACK_POINTER_REGNUM, since these are always considered to be
|
since it's always considered to be live. Similarly
|
||||||
live. Similarly for ARG_POINTER_REGNUM if it is fixed. */
|
for FRAME_POINTER_REGNUM if a frame pointer is needed
|
||||||
if (regno != FRAME_POINTER_REGNUM
|
and for ARG_POINTER_REGNUM if it is fixed. */
|
||||||
|
if (! (regno == FRAME_POINTER_REGNUM
|
||||||
|
&& (! reload_completed || frame_pointer_needed))
|
||||||
#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
|
#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
|
||||||
&& ! (regno == HARD_FRAME_POINTER_REGNUM)
|
&& ! (regno == HARD_FRAME_POINTER_REGNUM
|
||||||
|
&& (! reload_completed || frame_pointer_needed))
|
||||||
#endif
|
#endif
|
||||||
#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
|
#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
|
||||||
&& ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
|
&& ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
|
||||||
|
13
gcc/sched.c
13
gcc/sched.c
@ -2309,12 +2309,15 @@ attach_deaths (x, insn, set_p)
|
|||||||
|
|
||||||
if (regno >= FIRST_PSEUDO_REGISTER || ! global_regs[regno])
|
if (regno >= FIRST_PSEUDO_REGISTER || ! global_regs[regno])
|
||||||
{
|
{
|
||||||
/* Never add REG_DEAD notes for the FRAME_POINTER_REGNUM or the
|
/* Never add REG_DEAD notes for STACK_POINTER_REGNUM
|
||||||
STACK_POINTER_REGNUM, since these are always considered to be
|
since it's always considered to be live. Similarly
|
||||||
live. Similarly for ARG_POINTER_REGNUM if it is fixed. */
|
for FRAME_POINTER_REGNUM if a frame pointer is needed
|
||||||
if (regno != FRAME_POINTER_REGNUM
|
and for ARG_POINTER_REGNUM if it is fixed. */
|
||||||
|
if (! (regno == FRAME_POINTER_REGNUM
|
||||||
|
&& (! reload_completed || frame_pointer_needed))
|
||||||
#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
|
#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
|
||||||
&& ! (regno == HARD_FRAME_POINTER_REGNUM)
|
&& ! (regno == HARD_FRAME_POINTER_REGNUM
|
||||||
|
&& (! reload_completed || frame_pointer_needed))
|
||||||
#endif
|
#endif
|
||||||
#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
|
#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
|
||||||
&& ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
|
&& ! (regno == ARG_POINTER_REGNUM && fixed_regs[regno])
|
||||||
|
Loading…
Reference in New Issue
Block a user