CVS:
[libfirm] / ir / ir / irgwalk.h
index 7dab785..e856a8d 100644 (file)
@@ -6,6 +6,9 @@
 ** traverse an ir graph
 ** - execute the pre function before recursion
 ** - execute the post function after recursion
+**
+** Uses current_ir_graph (from irgraph.h)!!! Set it to the proper
+** graph before starting the walker.
 */
 
 
    Executes pre before visiting the predecessor of a node, post after.
    irg_walk uses the visited flag in irg and the nodes to determine visited
    nodes.  It executes inc_irg_visited(current_ir_graph) to generate a new
-   flag. */
+   flag.  It marks the node as visited before executing pre.
+   The void* env can be used to pass status information between the
+   pre and post functions.  */
 void irg_walk(ir_node *node,
              void (pre)(ir_node*, void*), void (post)(ir_node*, void*),
              void *env);
 
-/* walks only over Block nodes in the graph.  Has it's own visited
+/* Walks only over Block nodes in the graph.  Has it's own visited
    flag, so that it can be interleaved with the other walker.         */
 void irg_block_walk(ir_node *node,
                    void (pre)(ir_node*, void*), void (post)(ir_node*, void*),