aboutsummaryrefslogtreecommitdiff
path: root/gcc/sched.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1993-08-12 10:45:15 -0700
committerJim Wilson <wilson@gcc.gnu.org>1993-08-12 10:45:15 -0700
commit46aea93218b08e77f247b597c3dc779e294b77cb (patch)
treec29d6fe9b57ec44202e4ff2b649a40dd810d53fc /gcc/sched.c
parent2e7ac77cb9952913586e6b0e81776710b10e69f5 (diff)
downloadgcc-46aea93218b08e77f247b597c3dc779e294b77cb.zip
gcc-46aea93218b08e77f247b597c3dc779e294b77cb.tar.gz
gcc-46aea93218b08e77f247b597c3dc779e294b77cb.tar.bz2
(sched_analyze_insn): Handle USE before a JUMP_INSN just
like a USE before a CALL_INSN. From-SVN: r5141
Diffstat (limited to 'gcc/sched.c')
-rw-r--r--gcc/sched.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/sched.c b/gcc/sched.c
index 48b13ff..c02d349 100644
--- a/gcc/sched.c
+++ b/gcc/sched.c
@@ -1963,14 +1963,21 @@ sched_analyze_insn (x, insn)
else
sched_analyze_2 (x, insn);
- /* Handle function calls. */
- if (GET_CODE (insn) == CALL_INSN)
+ /* Handle function calls and function returns created by the epilogue
+ threading code. */
+ if (GET_CODE (insn) == CALL_INSN || GET_CODE (insn) == JUMP_INSN)
{
rtx dep_insn;
rtx prev_dep_insn;
/* When scheduling instructions, we make sure calls don't lose their
- accompanying USE insns by depending them one on another in order. */
+ accompanying USE insns by depending them one on another in order.
+
+ Also, we must do the same thing for returns created by the epilogue
+ threading code. Note this code works only in this special case,
+ because other passes make no guarantee that they will never emit
+ an instruction between a USE and a RETURN. There is such a guarantee
+ for USE instructions immediately before a call. */
prev_dep_insn = insn;
dep_insn = PREV_INSN (insn);