aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-08-25 05:24:04 +0000
committerJeff Law <law@gcc.gnu.org>1999-08-24 23:24:04 -0600
commit50f71e6f5fbf6780fb1354de88e44f5410e177f2 (patch)
tree3daf61f20e9dbe8587325cf989fc92c21dc5fc99 /gcc
parent8f04d345d03d88443584b518d7c6ec4629dbda42 (diff)
downloadgcc-50f71e6f5fbf6780fb1354de88e44f5410e177f2.zip
gcc-50f71e6f5fbf6780fb1354de88e44f5410e177f2.tar.gz
gcc-50f71e6f5fbf6780fb1354de88e44f5410e177f2.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/haifa-sched.c15
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4a19ff4..6597b92 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
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