*/
void irg_walk(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env)
{
- assert(node && node->kind==k_ir_node);
+ assert(is_ir_node(node));
if (get_interprocedural_view()) {
eset * irg_set = eset_create();
current_ir_graph = rem;
}
+/*
+ * Additionally walk over all anchors. Do NOT increase the visit flag.
+ */
+void irg_walk_anchors(ir_graph *irg, irg_walk_func *pre, irg_walk_func *post, void *env) {
+ int i;
+ ir_graph * rem = current_ir_graph;
+ current_ir_graph = irg;
+
+ for (i = 0; i < anchor_max; ++i) {
+ ir_node *anchor = irg->anchors[i];
+
+ irg_walk_2(anchor, pre, post, env);
+ }
+ current_ir_graph = rem;
+}
+
/********************************************************************/
typedef struct walk_env {