haifa-sched.c (add_branch_dependences): Make each insn in a SCHED_GROUP_P block expli...
authorJeffrey A Law <law@cygnus.com>
Sat, 13 Sep 1997 19:00:22 +0000 (19:00 +0000)
committerJeff Law <law@gcc.gnu.org>
Sat, 13 Sep 1997 19:00:22 +0000 (13:00 -0600)
        * haifa-sched.c (add_branch_dependences): Make each insn in
        a SCHED_GROUP_P block explicitly depend on the previous insn.
Fixes x86 abort.

From-SVN: r15430

gcc/ChangeLog
gcc/haifa-sched.c

index dae16a599e28b95ae7949ad8749c11897fccaf05..aea087b5471d2bdbb1fd9aec5da4ab3fd0f8e1c3 100644 (file)
@@ -1,3 +1,8 @@
+Sat Sep 13 12:57:26 1997  Jeffrey A Law  (law@cygnus.com)
+
+       * haifa-sched.c (add_branch_dependences): Make each insn in
+       a SCHED_GROUP_P block explicitly depend on the previous insn.
+
 Thu Sep 11 17:43:55 1997  Jim Wilson  <wilson@cygnus.com>
 
        * configure.in (native_prefix): Delete.
index 4b0be8879a8467534103fd090a6b537823bb84bb..16b1e20a753ecb5946c9dfe3640b1e01e269e162 100644 (file)
@@ -7106,9 +7106,17 @@ add_branch_dependences (head, tail)
          CANT_MOVE (insn) = 1;
 
          last = insn;
-         /* Skip over insns that are part of a group.  */
+         /* Skip over insns that are part of a group.
+            Make each insn explicitly depend on the previous insn.
+            This ensures that only the group header will ever enter
+            the ready queue (and, when scheduled, will automatically
+            schedule the SCHED_GROUP_P block).  */
          while (SCHED_GROUP_P (insn))
-           insn = prev_nonnote_insn (insn);
+           {
+             rtx temp = prev_nonnote_insn (insn);
+             add_dependence (insn, temp, REG_DEP_ANTI);
+             insn = temp;
+           }
        }
 
       /* Don't overrun the bounds of the basic block.  */