aboutsummaryrefslogtreecommitdiff
path: root/gcc/dce.c
diff options
context:
space:
mode:
authorMichael Matz <matzmich@cs.tu-berlin.de>2000-11-14 09:58:40 +0000
committerRichard Henderson <rth@gcc.gnu.org>2000-11-14 01:58:40 -0800
commitf80326884cf82c1804385664197afa44ad468d97 (patch)
tree0ae1829906b698b59a80644fab4750674494c842 /gcc/dce.c
parent6f1225504f3c4124fd4ab85edd0db620b14264ac (diff)
downloadgcc-f80326884cf82c1804385664197afa44ad468d97.zip
gcc-f80326884cf82c1804385664197afa44ad468d97.tar.gz
gcc-f80326884cf82c1804385664197afa44ad468d97.tar.bz2
Michael Matz <matzmich@cs.tu-berlin.de>
* dominance.c: New file. * Makefile.in (OBJS): Add dominance.o. * flow.c (compute_flow_dominators): Remove. (compute_immediate_dominators): Remove. (compute_immediate_postdominators): Remove. * basic-block.h: Remove their prototypes. (calculate_dominance_info): Add prototype. * dce.c (eliminate_dead_code): Change calls to above functions. Don't compute dominators but only immediate dominators. * flow.c (flow_loops_find): Change callers. * gcse.c (compute_code_hoist_data): Likewise. * haifa-sched.c (schedule_insns): Likewise. * ifcvt.c (if_convert): Likewise. * ssa.c (convert_to_ssa): Likewise, and only compute immediate dominators. From-SVN: r37449
Diffstat (limited to 'gcc/dce.c')
-rw-r--r--gcc/dce.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gcc/dce.c b/gcc/dce.c
index ddd2cd0..3a83d7a 100644
--- a/gcc/dce.c
+++ b/gcc/dce.c
@@ -485,7 +485,6 @@ eliminate_dead_code ()
/* Map element (b,e) is nonzero if the block is control dependent on
edge. "cdbte" abbreviates control dependent block to edge. */
control_dependent_block_to_edge_map cdbte;
- sbitmap *postdominators;
/* Element I is the immediate postdominator of block I. */
int *pdom;
struct edge_list *el;
@@ -504,17 +503,14 @@ eliminate_dead_code ()
compute_bb_for_insn (max_insn_uid);
/* Compute control dependence. */
- postdominators = sbitmap_vector_alloc (n_basic_blocks, n_basic_blocks);
- compute_flow_dominators (NULL, postdominators);
pdom = (int *) xmalloc (n_basic_blocks * sizeof (int));
for (i = 0; i < n_basic_blocks; ++i)
pdom[i] = INVALID_BLOCK;
- compute_immediate_postdominators (pdom, postdominators);
+ calculate_dominance_info (pdom, NULL, CDI_POST_DOMINATORS);
/* Assume there is a path from each node to the exit block. */
for (i = 0; i < n_basic_blocks; ++i)
if (pdom[i] == INVALID_BLOCK)
pdom[i] = EXIT_BLOCK;
- sbitmap_vector_free (postdominators);
el = create_edge_list();
find_all_control_dependences (el, pdom, cdbte);