This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa][PATCH]: Fix building of dominator tree
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 24 Nov 2003 14:39:31 -0500
- Subject: [tree-ssa][PATCH]: Fix building of dominator tree
As discussed in private mail, we need to clear dom_children on the
ENTRY_BLOCK as well, which means using FOR_ALL_BB instead of
FOR_EACH_BB.
This is necessary for an upcoming PRE patch which fixes bug 13163.
Bootstrapped and regtested on i686-pc-linux-gnu and
powerpc-apple-darwin7.
I'll commit as obvious in a few hours unless someone objects.
2003-11-23 Daniel Berlin <dberlin@dberlin.org>
* tree-cfg.c (cleanup_tree_cfg): FOR_EACH_BB -> FOR_ALL_BB when
clearing dom children, because the entry block has dom_children
too.
* tree-ssa.c (build_dominator_tree): Ditto.
Index: tree-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa.c,v
retrieving revision 1.1.4.160
diff -u -3 -p -r1.1.4.160 tree-ssa.c
--- tree-ssa.c 22 Nov 2003 04:13:49 -0000 1.1.4.160
+++ tree-ssa.c 24 Nov 2003 19:36:16 -0000
@@ -495,7 +495,7 @@ build_dominator_tree (dominance_info ido
{
basic_block bb;
- FOR_EACH_BB (bb)
+ FOR_ALL_BB (bb)
clear_dom_children (bb);
/* Using the immediate dominators, build a dominator tree. */
Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.222
diff -u -3 -p -r1.1.4.222 tree-cfg.c
--- tree-cfg.c 21 Nov 2003 19:49:14 -0000 1.1.4.222
+++ tree-cfg.c 24 Nov 2003 19:36:17 -0000
@@ -759,7 +759,7 @@ cleanup_tree_cfg (void)
{
basic_block bb;
- FOR_EACH_BB (bb)
+ FOR_ALL_BB (bb)
clear_dom_children (bb);
}