From: Jim Wilson Date: Thu, 12 Aug 1993 17:45:15 +0000 (-0700) Subject: (sched_analyze_insn): Handle USE before a JUMP_INSN just X-Git-Tag: misc/cutover-egcs-0~8802 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46aea93218b08e77f247b597c3dc779e294b77cb;p=thirdparty%2Fgcc.git (sched_analyze_insn): Handle USE before a JUMP_INSN just like a USE before a CALL_INSN. From-SVN: r5141 --- diff --git a/gcc/sched.c b/gcc/sched.c index 48b13ff3c1c1..c02d349192c5 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);