diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-03 19:10:44 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-03 19:10:44 +0000 |
commit | 3f9439d71f45a5eb2d699fb5b6d819143031b5db (patch) | |
tree | 00a98b1b54819809ffb6999717d9263ac5558fe2 /gcc/et-forest.c | |
parent | 604c77da256415c139a223b79136b93b64e5d2c5 (diff) | |
download | gcc-3f9439d71f45a5eb2d699fb5b6d819143031b5db.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125297 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/et-forest.c')
-rw-r--r-- | gcc/et-forest.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/et-forest.c b/gcc/et-forest.c index b8e55274109..b9dacc9b3e3 100644 --- a/gcc/et-forest.c +++ b/gcc/et-forest.c @@ -747,3 +747,20 @@ et_below (struct et_node *down, struct et_node *up) return !d->next || d->next->min + d->depth >= 0; } + +/* Returns the root of the tree that contains NODE. */ + +struct et_node * +et_root (struct et_node *node) +{ + struct et_occ *occ = node->rightmost_occ, *r; + + /* The root of the tree corresponds to the rightmost occurence in the + represented path. */ + et_splay (occ); + for (r = occ; r->next; r = r->next) + continue; + et_splay (r); + + return r->of; +} |