From dd69af4a1f0eae2ae112d25d05a0264644df3e9a Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Sat, 10 Apr 2010 11:55:21 +0000 Subject: [PATCH] Ignore Id's that arise because we modify the graph before visiting it ... [r27374] --- ir/opt/boolopt.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ir/opt/boolopt.c b/ir/opt/boolopt.c index 88940f8e9..fbe8d4569 100644 --- a/ir/opt/boolopt.c +++ b/ir/opt/boolopt.c @@ -585,9 +585,16 @@ static void move_nodes_to_block(ir_node *jmp, ir_node *to_block) static void find_cf_and_or_walker(ir_node *block, void *ctx) { int low_idx, up_idx; - int n_cfgpreds = get_Block_n_cfgpreds(block); + int n_cfgpreds; bool_opt_env_t *env = ctx; + /* because we modify the graph in regions we might not visited yet, + * Id nodes might arise here. Ignore them. + */ + if (is_Id(block)) + return; + + n_cfgpreds = get_Block_n_cfgpreds(block); restart: if (n_cfgpreds < 2) return; -- 2.20.1