X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firgwalk.h;h=5173e4b9aa54706c8a7001083a06b618a1dd3018;hb=23ea16875f38dc0c067cce24f64b5c70f3acc496;hp=cb2d5f668da23016a6c445f3b292623aef6326fc;hpb=749c2082b006b472d63f2e2b561547f7bc921954;p=libfirm diff --git a/ir/ir/irgwalk.h b/ir/ir/irgwalk.h index cb2d5f668..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 "firm_types.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_ */