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
This commit is contained in:
Stan Cox 2000-01-04 17:19:41 +00:00 committed by Stan Cox
parent a544cfd201
commit 7f103e8835
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,9 @@
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.
2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* builtins.c (expand_builtin_strlen): Initialize variable `icode'.

View File

@ -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