diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2007-06-03 21:10:44 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2007-06-03 19:10:44 +0000 |
commit | 66f97d31f233e10870728947731db603b5dc0c9c (patch) | |
tree | 00a98b1b54819809ffb6999717d9263ac5558fe2 /gcc/gcse.c | |
parent | b6a9c30c80a0713b0b27f434dfe34b0552fc7384 (diff) | |
download | gcc-66f97d31f233e10870728947731db603b5dc0c9c.tar.gz |
cfgloopmanip.c (remove_path, [...]): Change dom_bbs to vector.
* cfgloopmanip.c (remove_path, loopify, duplicate_loop_to_header_edge):
Change dom_bbs to vector. Add argument to iterate_fix_dominators call.
* loop-unroll.c (unroll_loop_runtime_iterations): Ditto.
* tree-cfg.c (tree_duplicate_sese_region): Change doms to vector.
Add argument to iterate_fix_dominators call.
(remove_edge_and_dominated_blocks): Pass vector to bbs_to_fix_dom.
* gcse.c (hoist_code): Change domby to vector.
* cfghooks.c (make_forwarder_block): Change doms_to_fix to vector.
Add argument to iterate_fix_dominators call.
* loop-doloop.c (doloop_modify): Changed recount_dominator to
recompute_dominator.
* lambda-code.c (perfect_nestify): Ditto.
* cfgloopanal.c: Include graphds.h.
(struct edge, struct vertex, struct graph, dump_graph, new_graph,
add_edge, dfs, for_each_edge, free_graph): Moved to graphds.c.
(mark_irreducible_loops): Use graphds_scc. Remove argument from
add_edge call.
* graphds.c: New file.
* graphds.h: New file.
* dominance.c: Include vecprim.h, pointer-set.h and graphds.h.
(get_dominated_by, get_dominated_by_region): Change return type to
vector.
(verify_dominators): Recompute all dominators and compare the results.
(recount_dominator): Renamed to ...
(recompute_dominator): ... this. Do not check that the block is
dominated by entry.
(iterate_fix_dominators): Reimplemented.
(prune_bbs_to_update_dominators, root_of_dom_tree,
determine_dominators_for_sons): New functions.
* et-forest.c (et_root): New function.
* et-forest.h (et_root): Declare.
* Makefile.in (graphds.o): Add.
(cfgloopanal.o): Add graphds.h dependency.
(dominance.o): Add graphds.h, vecprim.h and pointer-set.h dependency.
* basic-block.h (get_dominated_by, get_dominated_by_region,
iterate_fix_dominators): Declaration changed.
(recount_dominator): Renamed to ...
(recompute_dominator): ... this.
* tree-ssa-threadupdate.c (thread_block): Free dominance info.
(thread_through_all_blocks): Do not free dominance info.
From-SVN: r125297
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c index dd80e754454..461e26c855c 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -4829,8 +4829,7 @@ static void hoist_code (void) { basic_block bb, dominated; - basic_block *domby; - unsigned int domby_len; + VEC (basic_block, heap) *domby; unsigned int i,j; struct expr **index_map; struct expr *expr; @@ -4852,7 +4851,7 @@ hoist_code (void) int found = 0; int insn_inserted_p; - domby_len = get_dominated_by (CDI_DOMINATORS, bb, &domby); + domby = get_dominated_by (CDI_DOMINATORS, bb); /* Examine each expression that is very busy at the exit of this block. These are the potentially hoistable expressions. */ for (i = 0; i < hoist_vbeout[bb->index]->n_bits; i++) @@ -4865,9 +4864,8 @@ hoist_code (void) /* We've found a potentially hoistable expression, now we look at every block BB dominates to see if it computes the expression. */ - for (j = 0; j < domby_len; j++) + for (j = 0; VEC_iterate (basic_block, domby, j, dominated); j++) { - dominated = domby[j]; /* Ignore self dominance. */ if (bb == dominated) continue; @@ -4906,8 +4904,8 @@ hoist_code (void) /* If we found nothing to hoist, then quit now. */ if (! found) { - free (domby); - continue; + VEC_free (basic_block, heap, domby); + continue; } /* Loop over all the hoistable expressions. */ @@ -4923,9 +4921,8 @@ hoist_code (void) /* We've found a potentially hoistable expression, now we look at every block BB dominates to see if it computes the expression. */ - for (j = 0; j < domby_len; j++) + for (j = 0; VEC_iterate (basic_block, domby, j, dominated); j++) { - dominated = domby[j]; /* Ignore self dominance. */ if (bb == dominated) continue; @@ -4976,7 +4973,7 @@ hoist_code (void) } } } - free (domby); + VEC_free (basic_block, heap, domby); } free (index_map); |