* Insert all ir_graphs in irg_set, that are (transitive) reachable.
*/
static void collect_irgs(ir_node * node, eset * irg_set) {
- if (get_irn_op(node) == op_Call) {
+ if (is_Call(node)) {
int i;
for (i = get_Call_n_callees(node) - 1; i >= 0; --i) {
entity * ent = get_Call_callee(node, i);
*/
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 {