1 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
2 ** All rights reserved.
4 ** Author: Boris Boesler
6 ** traverse an ir graph
7 ** - execute the pre function before recursion
8 ** - execute the post function after recursion
10 ** Uses current_ir_graph (from irgraph.h)!!! Set it to the proper
11 ** graph before starting the walker.
21 /* Walks over the ir graph, starting at the node given as first argument.
22 Executes pre before visiting the predecessor of a node, post after.
23 irg_walk uses the visited flag in irg and the nodes to determine visited
24 nodes. It executes inc_irg_visited(current_ir_graph) to generate a new
26 void irg_walk(ir_node *node,
27 void (pre)(ir_node*, void*), void (post)(ir_node*, void*),
30 /* walks only over Block nodes in the graph. Has it's own visited
31 flag, so that it can be interleaved with the other walker. */
32 void irg_block_walk(ir_node *node,
33 void (pre)(ir_node*, void*), void (post)(ir_node*, void*),
37 # endif /* _IRGWALK_H_ */