[tree-ssa] Add description for dominator walker

Diego Novillo dnovillo@redhat.com
Wed Apr 7 22:13:00 GMT 2004

A brief overview of the dominator walker.


	* doc/tree-ssa.texi: Add documentation for the dominator

Index: doc/tree-ssa.texi
RCS file: /cvs/gcc/gcc/gcc/doc/Attic/tree-ssa.texi,v
retrieving revision
diff -d -c -p -d -u -p -r1.1.2.3 tree-ssa.texi
--- doc/tree-ssa.texi	24 Feb 2004 21:23:28 -0000
+++ doc/tree-ssa.texi	7 Apr 2004 22:09:32 -0000
@@ -382,10 +382,38 @@ If @var{fn} wants to get at @var{var}, i
 @end deftypefn
 @subsection Walking the dominator tree
-@cindex walk dominator tree
-In progress.
+@deftypefn {Tree SSA function} void walk_dominator_tree (@var{walk_data}, @var{bb})
+This function walks the dominator tree for the current CFG calling a
+set of callback functions defined in @var{struct dom_walk_data} in
+@file{domwalk.h}.  The call back functions you need to define give you
+hooks to execute custom code at various points during traversal:
+@item Once to initialize any local data needed while processing
+      @var{bb} and its children.  This local data is pushed into an
+      internal stack which is automatically pushed and popped as the
+      walker traverses the dominator tree.
+@item Once before traversing all the statements in the @var{bb}.
+@item Once for every statement inside @var{bb}.
+@item Once after traversing all the statements and before recursing
+      into @var{bb}'s dominator children.
+@item It then recurses into all the dominator children of @var{bb}.
+@item After recursing into all the dominator children of @var{bb} it
+      can, optionally, traverse every statement in @var{bb} again
+      (i.e., repeating steps 2 and 3).
+@item Once after walking the statements in @var{bb} and @var{bb}'s
+      dominator children.  At this stage, the block local data stack
+      is popped.
+@end enumerate
+@end deftypefn
 @node Alias analysis
 @section Alias analysis

More information about the Gcc-patches mailing list