Commit daf1b9ba authored by Christoph Mallon's avatar Christoph Mallon
Browse files

irouts: Do not use current_ir_graph in the outs walker.

parent 48072c07
...@@ -136,16 +136,17 @@ ir_node *get_Block_cfg_out_ka(const ir_node *bl, unsigned pos) ...@@ -136,16 +136,17 @@ ir_node *get_Block_cfg_out_ka(const ir_node *bl, unsigned pos)
static void irg_out_walk_2(ir_node *node, irg_walk_func *pre, static void irg_out_walk_2(ir_node *node, irg_walk_func *pre,
irg_walk_func *post, void *env) irg_walk_func *post, void *env)
{ {
assert(get_irn_visited(node) < get_irg_visited(current_ir_graph)); ir_graph *const irg = get_irn_irg(node);
assert(get_irn_visited(node) < get_irg_visited(irg));
set_irn_visited(node, get_irg_visited(current_ir_graph)); set_irn_visited(node, get_irg_visited(irg));
if (pre != NULL) if (pre != NULL)
pre(node, env); pre(node, env);
for (int i = 0, n = get_irn_n_outs(node); i < n; ++i) { for (int i = 0, n = get_irn_n_outs(node); i < n; ++i) {
ir_node *succ = get_irn_out(node, i); ir_node *succ = get_irn_out(node, i);
if (get_irn_visited(succ) < get_irg_visited(current_ir_graph)) if (get_irn_visited(succ) < get_irg_visited(irg))
irg_out_walk_2(succ, pre, post, env); irg_out_walk_2(succ, pre, post, env);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment