X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firgwalk.h;h=5173e4b9aa54706c8a7001083a06b618a1dd3018;hb=b78bdd4d94de46de4156272e6dbfe44e97933a5b;hp=fcf691bd156c6b79538eaffafce9e22979ed7ebe;hpb=29adffe7842acdc56e599f9342a27ff9e325c803;p=libfirm diff --git a/ir/ir/irgwalk.h b/ir/ir/irgwalk.h index fcf691bd1..5173e4b9a 100644 --- a/ir/ir/irgwalk.h +++ b/ir/ir/irgwalk.h @@ -25,12 +25,10 @@ * 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_ @@ -163,4 +161,16 @@ void walk_const_code(irg_walk_func *pre, irg_walk_func *post, void *env); */ 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_ */