aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1996-01-12 22:47:32 +0000
committerDoug Evans <dje@gnu.org>1996-01-12 22:47:32 +0000
commitef185f22f2c879365920487dcc3f8cbe5203a7f2 (patch)
treec03d3b03b48853a6119c5823bd2fac2f1f9004c3 /gcc
parent56d0ac720e91a1add303c73365f4241260fb5c19 (diff)
downloadgcc-ef185f22f2c879365920487dcc3f8cbe5203a7f2.zip
gcc-ef185f22f2c879365920487dcc3f8cbe5203a7f2.tar.gz
gcc-ef185f22f2c879365920487dcc3f8cbe5203a7f2.tar.bz2
sched.c (schedule_block): Maintain a valid chain so emit_note_before works.
* sched.c (schedule_block): Maintain a valid chain so emit_note_before works. From-SVN: r10970
Diffstat (limited to 'gcc')
-rw-r--r--gcc/sched.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/sched.c b/gcc/sched.c
index 150f68f..dd194e6b 100644
--- a/gcc/sched.c
+++ b/gcc/sched.c
@@ -1,5 +1,5 @@
/* Instruction scheduling pass.
- Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93-95, 1996 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
Enhanced by, and currently maintained by, Jim Wilson (wilson@cygnus.com)
@@ -3909,6 +3909,14 @@ schedule_block (b, file)
sched_n_insns += 1;
NEXT_INSN (insn) = last;
PREV_INSN (last) = insn;
+
+ /* Maintain a valid chain so emit_note_before works.
+ This is necessary because PREV_INSN (insn) isn't valid and
+ if it points to an insn already scheduled, a circularity
+ will result. */
+ NEXT_INSN (prev_head) = insn;
+ PREV_INSN (insn) = prev_head;
+
last = insn;
/* Check to see if we need to re-emit any notes here. */
@@ -3946,6 +3954,14 @@ schedule_block (b, file)
sched_n_insns += 1;
NEXT_INSN (insn) = last;
PREV_INSN (last) = insn;
+
+ /* Maintain a valid chain so emit_note_before works.
+ This is necessary because PREV_INSN (insn) isn't valid and
+ if it points to an insn already scheduled, a circularity
+ will result. */
+ NEXT_INSN (prev_head) = insn;
+ PREV_INSN (insn) = prev_head;
+
last = insn;
last = reemit_notes (insn, last);