aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-11-11 09:21:12 +0000
committerJeff Law <law@gcc.gnu.org>1999-11-11 02:21:12 -0700
commitce72425040a624ab42466d60da50db9281221324 (patch)
tree62d2dd61bfefebccef8340515c5d9930c4e5d1f0 /gcc/flow.c
parentcc2bd962dab4c5f4efddccca2e7beecf95102370 (diff)
downloadgcc-ce72425040a624ab42466d60da50db9281221324.zip
gcc-ce72425040a624ab42466d60da50db9281221324.tar.gz
gcc-ce72425040a624ab42466d60da50db9281221324.tar.bz2
flow.c (compute_flow_dominators): Initially put all blocks on the worklist.
* flow.c (compute_flow_dominators): Initially put all blocks on the worklist. * lcm.c (compute_antinout_edge, compute_available): Similarly. * gcse.c (compute_cprop_avinout): Remove. (compute_cprop_data): Use compute_available. (delete_null_pointer_checks_1): Use compute_available. From-SVN: r30484
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 96618b53..9ed2b35 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -5339,24 +5339,21 @@ compute_flow_dominators (dominators, post_dominators)
if (dominators)
{
- /* Clear the AUX field for each basic block. */
+ /* The optimistic setting of dominators requires us to put every
+ block on the work list initially. */
for (bb = 0; bb < n_basic_blocks; bb++)
- BASIC_BLOCK (bb)->aux = NULL;
+ {
+ *tos++ = BASIC_BLOCK (bb);
+ BASIC_BLOCK (bb)->aux = BASIC_BLOCK (bb);
+ }
/* We want a maximal solution, so initially assume everything dominates
everything else. */
sbitmap_vector_ones (dominators, n_basic_blocks);
- /* Put the successors of the entry block on the worklist. */
+ /* Mark successors of the entry block so we can identify them below. */
for (e = ENTRY_BLOCK_PTR->succ; e; e = e->succ_next)
- {
- *tos++ = e->dest;
-
- /* We use the block's aux field to track blocks which are in
- the worklist; we also use it to quickly determine which blocks
- are successors of the ENTRY block. */
- e->dest->aux = ENTRY_BLOCK_PTR;
- }
+ e->dest->aux = ENTRY_BLOCK_PTR;
/* Iterate until the worklist is empty. */
while (tos != worklist)
@@ -5412,24 +5409,21 @@ compute_flow_dominators (dominators, post_dominators)
if (post_dominators)
{
- /* Clear the AUX field for each basic block. */
+ /* The optimistic setting of dominators requires us to put every
+ block on the work list initially. */
for (bb = 0; bb < n_basic_blocks; bb++)
- BASIC_BLOCK (bb)->aux = NULL;
+ {
+ *tos++ = BASIC_BLOCK (bb);
+ BASIC_BLOCK (bb)->aux = BASIC_BLOCK (bb);
+ }
/* We want a maximal solution, so initially assume everything post
dominates everything else. */
sbitmap_vector_ones (post_dominators, n_basic_blocks);
- /* Put the predecessors of the exit block on the worklist. */
+ /* Mark predecessors of the exit block so we can identify them below. */
for (e = EXIT_BLOCK_PTR->pred; e; e = e->pred_next)
- {
- *tos++ = e->src;
-
- /* We use the block's aux field to track blocks which are in
- the worklist; we also use it to quickly determine which blocks
- are predecessors of the EXIT block. */
- e->src->aux = EXIT_BLOCK_PTR;
- }
+ e->src->aux = EXIT_BLOCK_PTR;
/* Iterate until the worklist is empty. */
while (tos != worklist)