summaryrefslogtreecommitdiff
path: root/gcc/lcm.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-15 06:12:50 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-15 06:12:50 +0000
commit048599b9db1706220f7f0eab05a4edc3c82fdc41 (patch)
tree735e2967a477839c393b6afce3b1c00c55796967 /gcc/lcm.c
parentce23987eb2e90cf6948d17b75414f3310a1e1657 (diff)
downloadgcc-048599b9db1706220f7f0eab05a4edc3c82fdc41.tar.gz
* gcse.c (pre_expr_reaches_here_p): Kill CHECK_PRE_COM argument.
All callers changed. (pre_expr_reaches_here_p_work): Likewise. (pre_edge_insert): No longer call pre_expr_reaches_here_p. * lcm.c (compute_laterin): Fix initialization of LATER. (compute_nearerout): Similarly for NEARER. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30528 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lcm.c')
-rw-r--r--gcc/lcm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/lcm.c b/gcc/lcm.c
index 12a16ed87c0..dd900b6132d 100644
--- a/gcc/lcm.c
+++ b/gcc/lcm.c
@@ -269,6 +269,13 @@ compute_laterin (edge_list, earliest, antloc, later, laterin)
of the optimistic edge. That will requeue the affected blocks. */
sbitmap_vector_ones (later, num_edges);
+ /* Note that even though we want an optimistic setting of LATER, we
+ do not want to be overly optimistic. Consider an outgoing edge from
+ the entry block. That edge should always have a LATER value the
+ same as EARLIEST for that edge. */
+ for (e = ENTRY_BLOCK_PTR->succ; e; e = e->succ_next)
+ sbitmap_copy (later[(int)e->aux], earliest[(int)e->aux]);
+
/* Add all the blocks to the worklist. This prevents an early exit from
the loop given our optimistic initialization of LATER above. */
for (bb = n_basic_blocks - 1; bb >= 0; bb--)
@@ -598,6 +605,13 @@ compute_nearerout (edge_list, farthest, st_avloc, nearer, nearerout)
/* We want a maximal solution. */
sbitmap_vector_ones (nearer, num_edges);
+ /* Note that even though we want an optimistic setting of NEARER, we
+ do not want to be overly optimistic. Consider an incoming edge to
+ the exit block. That edge should always have a NEARER value the
+ same as FARTHEST for that edge. */
+ for (e = EXIT_BLOCK_PTR->pred; e; e = e->pred_next)
+ sbitmap_copy (nearer[(int)e->aux], farthest[(int)e->aux]);
+
/* Add all the blocks to the worklist. This prevents an early exit
from the loop given our optimistic initialization of NEARER. */
for (bb = 0; bb < n_basic_blocks; bb++)