aboutsummaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authorStan Cox <scox@cygnus.com>2000-01-04 17:19:41 +0000
committerStan Cox <scox@gcc.gnu.org>2000-01-04 17:19:41 +0000
commit7f103e88351413723e4dc3013824cf5a4c7a51f2 (patch)
treed84560fa135a4fbe6eb26708b345e558c43ee5ab /gcc/haifa-sched.c
parenta544cfd20164c1c8513be05e1c1976c0fd005735 (diff)
downloadgcc-7f103e88351413723e4dc3013824cf5a4c7a51f2.zip
gcc-7f103e88351413723e4dc3013824cf5a4c7a51f2.tar.gz
gcc-7f103e88351413723e4dc3013824cf5a4c7a51f2.tar.bz2
haifa-sched.c (build_control_flow): Change unreachable simple loop test to check if...
2000-01-04 Stan Cox <scox@cygnus.com> * haifa-sched.c (build_control_flow): Change unreachable simple loop test to check if current block has only one predecessor. (find_rgns): Initialize degree. Use dest as degree index, not src. From-SVN: r31208
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index e3eedbb..f9fb504 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -1061,7 +1061,7 @@ build_control_flow (edge_list)
basic_block b = BASIC_BLOCK (i);
if (b->pred == NULL
- || (b->pred->dest == b
+ || (b->pred->src == b
&& b->pred->pred_next == NULL))
unreachable = 1;
}
@@ -1531,12 +1531,14 @@ find_rgns (edge_list, dom)
to hold degree counts. */
degree = dfs_nr;
+ for (i = 0; i < n_basic_blocks; i++)
+ degree[i] = 0;
for (i = 0; i < num_edges; i++)
{
edge e = INDEX_EDGE (edge_list, i);
- if (e->src != ENTRY_BLOCK_PTR)
- degree[e->src->index]++;
+ if (e->dest != EXIT_BLOCK_PTR)
+ degree[e->dest->index]++;
}
/* Do not perform region scheduling if there are any unreachable