diff options
author | Andrew MacLeod <amacleod@cygnus.com> | 1999-08-25 18:01:48 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 1999-08-25 18:01:48 +0000 |
commit | 36349f8be4d205674b7ac3a4711ffdf2e2220792 (patch) | |
tree | ba955e0fe6c71fda70442293df272f976fb43e4e /gcc/gcse.c | |
parent | 3d31bc7f586d9d4980995289e5057beed1a8227a (diff) | |
download | gcc-36349f8be4d205674b7ac3a4711ffdf2e2220792.zip gcc-36349f8be4d205674b7ac3a4711ffdf2e2220792.tar.gz gcc-36349f8be4d205674b7ac3a4711ffdf2e2220792.tar.bz2 |
sbitmap.h (sbitmap_intersection_of_succs): Add prototype.
Wed Aug 25 13:55:47 EDT 1999 Andrew MacLeod <amacleod@cygnus.com>
* sbitmap.h (sbitmap_intersection_of_succs): Add prototype.
(sbitmap_intersection_of_preds, sbitmap_union_of_succs,
sbitmap_union_of_preds): Add prototypes.
* sbitmap.c (sbitmap_intersection_of_succs): New function to compute
the intersection of successors with the new flow graph structures.
(sbitmap_intersection_of_preds): New function to compute the
intersection of predecessors with the new flow graph structures.
(sbitmap_union_of_succs): New function to compute the union of
successors with the new flow graph structures.
(sbitmap_union_of_preds): New function to compute the union of
predecessors with the new flow graph structures.
* gcse.c (compute_rdm, compute_available): Use new sbitmap routines.
(expr_reaches_here_p): Use edge and basic_block structures instead
of s_preds and s_succs.
(compute_cprop_avinout): Use new sbitmap routines.
(pre_expr_reaches_here_p): Use edge and basic_block structures instead
of s_preds and s_succs.
* flow.c (compute_flow_dominators): Compute dominators using
edges and basic blocks instead of s_preds and s_succs.
From-SVN: r28866
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -2632,8 +2632,7 @@ compute_rd () changed = 0; for (bb = 0; bb < n_basic_blocks; bb++) { - sbitmap_union_of_predecessors (reaching_defs[bb], rd_out, - bb, s_preds); + sbitmap_union_of_preds (reaching_defs[bb], rd_out, bb); changed |= sbitmap_union_of_diff (rd_out[bb], rd_gen[bb], reaching_defs[bb], rd_kill[bb]); } @@ -2833,7 +2832,7 @@ compute_available () changed = 0; for (bb = 1; bb < n_basic_blocks; bb++) { - sbitmap_intersect_of_predecessors (ae_in[bb], ae_out, bb, s_preds); + sbitmap_intersection_of_preds (ae_in[bb], ae_out, bb); changed |= sbitmap_union_of_diff (ae_out[bb], ae_gen[bb], ae_in[bb], ae_kill[bb]); } @@ -2870,7 +2869,7 @@ expr_reaches_here_p (occr, expr, bb, check_self_loop, visited) int check_self_loop; char *visited; { - int_list_ptr pred; + edge pred; if (visited == NULL) { @@ -2878,9 +2877,9 @@ expr_reaches_here_p (occr, expr, bb, check_self_loop, visited) bzero (visited, n_basic_blocks); } - for (pred = s_preds[bb]; pred != NULL; pred = pred->next) + for (pred = BASIC_BLOCK(bb)->pred; pred != NULL; pred = pred->pred_next) { - int pred_bb = INT_LIST_VAL (pred); + int pred_bb = pred->src->index; if (visited[pred_bb]) { @@ -3512,8 +3511,7 @@ compute_cprop_avinout () for (bb = 0; bb < n_basic_blocks; bb++) { if (bb != 0) - sbitmap_intersect_of_predecessors (cprop_avin[bb], - cprop_avout, bb, s_preds); + sbitmap_intersection_of_preds (cprop_avin[bb], cprop_avout, bb); changed |= sbitmap_union_of_diff (cprop_avout[bb], cprop_pavloc[bb], cprop_avin[bb], @@ -4125,7 +4123,7 @@ pre_expr_reaches_here_p (occr_bb, expr, bb, check_pre_comp, visited) int check_pre_comp; char *visited; { - int_list_ptr pred; + edge pred; if (visited == NULL) { @@ -4133,11 +4131,11 @@ pre_expr_reaches_here_p (occr_bb, expr, bb, check_pre_comp, visited) bzero (visited, n_basic_blocks); } - for (pred = s_preds[bb]; pred != NULL; pred = pred->next) + for (pred = BASIC_BLOCK (bb)->pred; pred != NULL; pred = pred->pred_next) { - int pred_bb = INT_LIST_VAL (pred); + int pred_bb = pred->src->index; - if (pred_bb == ENTRY_BLOCK + if (pred->src == ENTRY_BLOCK_PTR /* Has predecessor has already been visited? */ || visited[pred_bb]) { |