From 50f71e6f5fbf6780fb1354de88e44f5410e177f2 Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Wed, 25 Aug 1999 05:24:04 +0000 Subject: haifa-sched.c (find_rgns): Mark a block found during the DFS search as reachable. * haifa-sched.c (find_rgns): Mark a block found during the DFS search as reachable. From-SVN: r28838 --- gcc/haifa-sched.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gcc/haifa-sched.c') diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 9ec8772..5638592 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -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 -- cgit v1.1