]> gcc.gnu.org Git - gcc.git/commitdiff
haifa-sched.c (move_insn): Reemit notes for SCHED_GROUP_P insns too.
authorJeffrey A Law <law@cygnus.com>
Tue, 19 Aug 1997 18:02:21 +0000 (18:02 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 19 Aug 1997 18:02:21 +0000 (12:02 -0600)
        * haifa-sched.c (move_insn): Reemit notes for SCHED_GROUP_P
        insns too.
        (schedule_block): When adjusting basic_block_{head,end}, account
        for movement of SCHED_GROUP_P insns too.

        * haifa-sched.c (debug_dependencies): Fix thinko.

From-SVN: r14849

gcc/ChangeLog
gcc/haifa-sched.c

index 89814a562d882563bda846e70a21d7f33b5a1ea7..4348398379495b5e155cbbb11d6612040d9f6032 100644 (file)
@@ -1,9 +1,16 @@
 Tue Aug 19 09:34:57 1997  Jeffrey A Law  (law@cygnus.com)
 
+       * haifa-sched.c (move_insn): Reemit notes for SCHED_GROUP_P
+       insns too.
+       (schedule_block): When adjusting basic_block_{head,end}, account
+       for movement of SCHED_GROUP_P insns too.
+
+       * haifa-sched.c (debug_dependencies): Fix thinko.
+
        * Makefile.in (EXPECT, RUNTEST, RUNTESTFLAGS): Define.
        (site.exp, check, check-g++, check-gcc): New targets.
 
-       * haifa-sched.c: Make lots of variable static.
+       * haifa-sched.c: Make lots of variables static.
 
 Tue Aug 19 07:18:34 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
 
index 0fab54ba5e2dfa32fd66b267409a5db0d51c41ac..222a6d6fe009e16dca2174d6efb4ac600eb2db2d 100644 (file)
@@ -6842,6 +6842,8 @@ schedule_block (bb, rgn, rgn_n_insns)
              /* an interblock motion? */
              if (INSN_BB (insn) != target_bb)
                {
+                 rtx temp;
+
                  if (IS_SPECULATIVE_INSN (insn))
                    {
 
@@ -6862,20 +6864,34 @@ schedule_block (bb, rgn, rgn_n_insns)
                    }
                  nr_inter++;
 
-                 /* update source block boundaries */
-                 b1 = INSN_BLOCK (insn);
-                 if (insn == basic_block_head[b1]
+                 temp = insn;
+                 while (SCHED_GROUP_P (temp))
+                   temp = PREV_INSN (temp);
+
+                 /* Update source block boundaries.   */
+                 b1 = INSN_BLOCK (temp);
+                 if (temp == basic_block_head[b1]
                      && insn == basic_block_end[b1])
                    {
-                     emit_note_after (NOTE_INSN_DELETED, basic_block_head[b1]);
-                     basic_block_end[b1] = basic_block_head[b1] = NEXT_INSN (insn);
+                     /* We moved all the insns in the basic block.
+                        Emit a note after the last insn and update the
+                        begin/end boundaries to point to the note.  */
+                     emit_note_after (NOTE_INSN_DELETED, insn);
+                     basic_block_end[b1] = NEXT_INSN (insn);
+                     basic_block_head[b1] = NEXT_INSN (insn);
                    }
                  else if (insn == basic_block_end[b1])
                    {
-                     basic_block_end[b1] = PREV_INSN (insn);
+                     /* We took insns from the end of the basic block,
+                        so update the end of block boundary so that it
+                        points to the first insn we did not move.  */
+                     basic_block_end[b1] = PREV_INSN (temp);
                    }
-                 else if (insn == basic_block_head[b1])
+                 else if (temp == basic_block_head[b1])
                    {
+                     /* We took insns from the start of the basic block,
+                        so update the start of block boundary so that
+                        it points to the first insn we did not move.  */
                      basic_block_head[b1] = NEXT_INSN (insn);
                    }
                }
@@ -7385,7 +7401,7 @@ debug_dependencies ()
                                 NOTE_SOURCE_FILE (insn));
                    }
                  else
-                   fprintf (dump, " {%s}\n", GET_RTX_NAME (insn));
+                   fprintf (dump, " {%s}\n", GET_RTX_NAME (GET_CODE (insn)));
                  continue;
                }
 
This page took 0.073883 seconds and 5 git commands to generate.