summaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 14:01:52 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 14:01:52 +0000
commit59f3ea59d3c5c480e0ea7958da7a4ef6e317b91f (patch)
tree1f17a313bc30e85d418e64815f036e5b5545b849 /gcc/tree-cfg.c
parentd2bf053d7a80f067d92121a8e72d935785fc76b8 (diff)
downloadgcc-59f3ea59d3c5c480e0ea7958da7a4ef6e317b91f.tar.gz
2009-04-20 Richard Guenther <rguenther@suse.de>
* basic-block.h (get_all_dominated_blocks): Declare. * dominance.c (get_all_dominated_blocks): New function. * tree-cfg.c (get_all_dominated_blocks): Remove. (remove_edge_and_dominated_blocks): Adjust. * tree-ssa-phiprop.c (tree_ssa_phiprop_1): Fold in ... (tree_ssa_phiprop): ... here. Use get_all_dominated_blocks instead of recursing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146425 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 9c701463784..009f9a96388 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -6681,20 +6681,6 @@ gimple_purge_dead_abnormal_call_edges (basic_block bb)
return changed;
}
-/* Stores all basic blocks dominated by BB to DOM_BBS. */
-
-static void
-get_all_dominated_blocks (basic_block bb, VEC (basic_block, heap) **dom_bbs)
-{
- basic_block son;
-
- VEC_safe_push (basic_block, heap, *dom_bbs, bb);
- for (son = first_dom_son (CDI_DOMINATORS, bb);
- son;
- son = next_dom_son (CDI_DOMINATORS, son))
- get_all_dominated_blocks (son, dom_bbs);
-}
-
/* Removes edge E and all the blocks dominated by it, and updates dominance
information. The IL in E->src needs to be updated separately.
If dominance info is not available, only the edge E is removed.*/
@@ -6754,7 +6740,7 @@ remove_edge_and_dominated_blocks (edge e)
get_immediate_dominator (CDI_DOMINATORS, e->dest)->index);
else
{
- get_all_dominated_blocks (e->dest, &bbs_to_remove);
+ bbs_to_remove = get_all_dominated_blocks (CDI_DOMINATORS, e->dest);
for (i = 0; VEC_iterate (basic_block, bbs_to_remove, i, bb); i++)
{
FOR_EACH_EDGE (f, ei, bb->succs)