From 2fb7920bc4fa45a95fde68df15f78d6841658156 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 21 Jan 2008 17:17:16 +0000 Subject: [PATCH] improve docu, use using_block_visited debug help [r17479] --- include/libfirm/iredges.h | 4 ++-- ir/ir/iredges.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/libfirm/iredges.h b/include/libfirm/iredges.h index 43b2f9d2c..31c28165b 100644 --- a/include/libfirm/iredges.h +++ b/include/libfirm/iredges.h @@ -235,8 +235,8 @@ void edges_node_deleted(ir_node *irn, ir_graph *irg); void edges_notify_edge(ir_node *src, int pos, ir_node *tgt, ir_node *old_tgt, ir_graph *irg); /** - * Walks only over Block nodes in the graph. Has it's own visited - * flag, so that it can be interleaved with the other walker. + * Walks only over Block nodes in the graph. Uses the block visited + * flag, so that it can be interleaved with another walker. * * @param block the start block * @param pre the pre visit function diff --git a/ir/ir/iredges.c b/ir/ir/iredges.c index 7eb0197aa..874a90a8d 100644 --- a/ir/ir/iredges.c +++ b/ir/ir/iredges.c @@ -919,8 +919,6 @@ static void irg_block_edges_walk2(ir_node *bl, } } -/* Walks only over Block nodes in the graph. Has it's own visited - flag, so that it can be interleaved with the other walker. */ void irg_block_edges_walk(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env) { @@ -928,6 +926,10 @@ void irg_block_edges_walk(ir_node *node, assert(edges_activated(current_ir_graph)); assert(is_Block(node)); + set_using_block_visited(current_ir_graph); + inc_irg_block_visited(current_ir_graph); irg_block_edges_walk2(node, pre, post, env); + + clear_using_block_visited(current_ir_graph); } -- 2.20.1