diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-30 18:07:44 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-30 18:07:44 +0000 |
commit | 501793e320d7c2e201ba7631cbcc5a9010163144 (patch) | |
tree | 5bfe6696efdf613c71ba47adae1a6cf747f80eef /gcc/sched-deps.c | |
parent | deab2811a15eb9d9c0e41d0af964b4af71cf6194 (diff) | |
download | gcc-501793e320d7c2e201ba7631cbcc5a9010163144.tar.gz |
* sched-deps.c (sched_analyze): Make a call read the frame pointer.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49341 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-deps.c')
-rw-r--r-- | gcc/sched-deps.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 384bab7db81..9f20aad331b 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -1267,21 +1267,30 @@ sched_analyze (deps, head, tail) } else { - /* A call may read and modify global register variables. - Other call-clobbered hard regs may be clobbered. We - don't know what set of fixed registers might be used - by the function. It is certain that the stack pointer - is among them, but be conservative. */ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) + /* A call may read and modify global register variables. */ if (global_regs[i]) { SET_REGNO_REG_SET (reg_pending_sets, i); SET_REGNO_REG_SET (reg_pending_uses, i); } + /* Other call-clobbered hard regs may be clobbered. */ else if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)) SET_REGNO_REG_SET (reg_pending_clobbers, i); + /* We don't know what set of fixed registers might be used + by the function, but it is certain that the stack pointer + is among them, but be conservative. */ else if (fixed_regs[i]) SET_REGNO_REG_SET (reg_pending_uses, i); + /* The frame pointer is normally not used by the function + itself, but by the debugger. */ + /* ??? MIPS o32 is an exception. It uses the frame pointer + in the macro expansion of jal but does not represent this + fact in the call_insn rtl. */ + else if (i == FRAME_POINTER_REGNUM + || (i == HARD_FRAME_POINTER_REGNUM + && (! reload_completed || frame_pointer_needed))) + SET_REGNO_REG_SET (reg_pending_uses, i); } /* For each insn which shouldn't cross a call, add a dependence |