* Uses current_ir_graph (from irgraph.h)!!! Set it to the proper
* graph before starting the walker.
*/
+#ifndef _FIRM_IR_IRGWALK_H_
+#define _FIRM_IR_IRGWALK_H_
-
-# ifndef _IRGWALK_H_
-# define _IRGWALK_H_
-
-# include "irnode.h"
+#include "firm_types.h"
/* type of callback function for ir_graph walk */
#ifndef _IRG_WALK_FUNC_TYPEDEF_
*/
void irg_walk_blkwise_graph(ir_graph *irg, irg_walk_func *pre, irg_walk_func *post, void *env);
-# endif /* _IRGWALK_H_ */
+/**
+ * Additionally walk over all anchors. Do NOT increase the visit flag.
+ * This function visits all anchor nodes that otherwise might not been visited in a
+ * walk, for instance the Bad() node.
+ *
+ * @param irg - the irg graph
+ * @param pre - walker function, executed before the predecessor of a node are visited
+ * @param post - walker function, executed after the predecessor of a node are visited
+ * @param env - environment, passed to pre and post
+ */
+void irg_walk_anchors(ir_graph *irg, irg_walk_func *pre, irg_walk_func *post, void *env);
+
+#endif /* _FIRM_IR_IRGWALK_H_ */