]> gcc.gnu.org Git - gcc.git/commitdiff
sched.c (schedule_block): Maintain a valid chain so emit_note_before works.
authorDoug Evans <dje@gnu.org>
Fri, 12 Jan 1996 22:47:32 +0000 (22:47 +0000)
committerDoug Evans <dje@gnu.org>
Fri, 12 Jan 1996 22:47:32 +0000 (22:47 +0000)
* sched.c (schedule_block): Maintain a valid chain so
emit_note_before works.

From-SVN: r10970

gcc/sched.c

index 150f68f604971723a186dd3f1c557c9dc1dc047e..dd194e6b94bb8e6bf7869438aad57864a2ed034e 100644 (file)
@@ -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);
This page took 0.073755 seconds and 5 git commands to generate.