From: Jim Wilson Date: Mon, 9 Aug 1993 19:37:23 +0000 (-0700) Subject: (schedule_insns): Don't emit a NOTE at the end of the last basic block if... X-Git-Tag: misc/cutover-egcs-0~8822 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=211b330fd8f17c6be56de8048edb5ab0a1633220;p=thirdparty%2Fgcc.git (schedule_insns): Don't emit a NOTE at the end of the last basic block if... (schedule_insns): Don't emit a NOTE at the end of the last basic block if that would put it between a JUMP_INSN and a BARRIER. From-SVN: r5121 --- diff --git a/gcc/sched.c b/gcc/sched.c index 9da35d0d7002..48b13ff3c1c1 100644 --- a/gcc/sched.c +++ b/gcc/sched.c @@ -4497,9 +4497,17 @@ schedule_insns (dump_file) /* Schedule each basic block, block by block. */ - if (NEXT_INSN (basic_block_end[n_basic_blocks-1]) == 0 - || (GET_CODE (basic_block_end[n_basic_blocks-1]) != NOTE - && GET_CODE (basic_block_end[n_basic_blocks-1]) != CODE_LABEL)) + /* ??? Add a NOTE after the last insn of the last basic block. It is not + known why this is done. */ + + insn = basic_block_end[n_basic_blocks-1]; + if (NEXT_INSN (insn) == 0 + || (GET_CODE (insn) != NOTE + && GET_CODE (insn) != CODE_LABEL + /* Don't emit a NOTE if it would end up between an unconditional + jump and a BARRIER. */ + && ! (GET_CODE (insn) == JUMP_INSN + && GET_CODE (NEXT_INSN (insn)) == BARRIER))) emit_note_after (NOTE_INSN_DELETED, basic_block_end[n_basic_blocks-1]); for (b = 0; b < n_basic_blocks; b++)