]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(schedule_insns): Don't emit a NOTE at the end of the last basic block if...
authorJim Wilson <wilson@gcc.gnu.org>
Mon, 9 Aug 1993 19:37:23 +0000 (12:37 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Mon, 9 Aug 1993 19:37:23 +0000 (12:37 -0700)
(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

gcc/sched.c

index 9da35d0d7002342232ecb49e6f361c5975c98834..48b13ff3c1c1ca4195f8ddb1bf16d3dc1f159fd0 100644 (file)
@@ -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++)