haifa-sched.c (find_rgns): Mark a block found during the DFS search as reachable.
authorJeffrey A Law <law@cygnus.com>
Wed, 25 Aug 1999 05:24:04 +0000 (05:24 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 25 Aug 1999 05:24:04 +0000 (23:24 -0600)
        * haifa-sched.c (find_rgns): Mark a block found during the DFS search
        as reachable.

From-SVN: r28838

gcc/ChangeLog
gcc/haifa-sched.c

index 4a19ff4c39da93712179ae5de1cd7492edf5e3a2..6597b92dc2f5fa0f8b420314dbe34f85cb265497 100644 (file)
@@ -1,5 +1,8 @@
 Tue Aug 24 22:56:35 1999  Jeffrey A Law  (law@cygnus.com)
 
+       * haifa-sched.c (find_rgns): Mark a block found during the DFS search
+       as reachable.
+
        * haifa-sched.c (get_visual_tbl_length): Fix off-by-one error.
 
 Tue Aug 24 22:41:06 1999  Mumit Khan  <khan@xraylith.wisc.edu>
index 9ec8772b7bff4a398b32ab90f4aa0082602019be..5638592e17d416b731960740cd6200024405a2ea 100644 (file)
@@ -1595,6 +1595,21 @@ find_rgns (s_preds, s_succs, num_preds, num_succs, dom)
       stack[++sp] = current_edge;
       SET_BIT (passed, current_edge);
       current_edge = OUT_EDGES (child);
+
+      /* This is temporary until haifa is converted to use rth's new
+        cfg routines which have true entry/exit blocks and the
+        appropriate edges from/to those blocks.
+
+        Generally we update dfs_nr for a node when we process its
+        out edge.  However, if the node has no out edge then we will
+        not set dfs_nr for that node.  This can confuse the scheduler
+        into thinking that we have unreachable blocks, which in turn
+        disables cross block scheduling. 
+
+        So, if we have a node with no out edges, go ahead and mark it
+        as reachable now.  */
+      if (current_edge == 0)
+       dfs_nr[child] = ++count;
     }
 
   /* Another check for unreachable blocks.  The earlier test in