From f4c32c9079f634da2aded5a3addbf11a58364626 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 9 Jan 2007 00:07:14 +0000 Subject: [PATCH] Fixed a bad bug in stat_merge_nodes: was NOT counting nodes ... [r8505] --- ir/stat/firmstat.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ir/stat/firmstat.c b/ir/stat/firmstat.c index 0f5ae346c..8d4d47591 100644 --- a/ir/stat/firmstat.c +++ b/ir/stat/firmstat.c @@ -1487,25 +1487,25 @@ static void stat_merge_nodes( opt = HOOK_OPT_REASSOC; for (i = 0; i < old_num_entries; ++i) { + /* nodes might be in new and old, so if we found a node + in both sets, this one is NOT removed */ for (j = 0; j < new_num_entries; ++j) { if (old_node_array[i] == new_node_array[j]) break; + } /* for */ + if (j >= new_num_entries) { + int xopt = opt; - /* nodes might be in new and old, these are NOT removed */ - if (j >= new_num_entries) { - int xopt = opt; - - /* sometimes we did not detect, that it is replaced by a Const */ - if (opt == HOOK_OPT_CONFIRM && new_num_entries == 1) { - ir_op *op = get_irn_op(new_node_array[0]); - - if (op == op_Const || op == op_SymConst) - xopt = HOOK_OPT_CONFIRM_C; - } /* if */ + /* sometimes we did not detect, that it is replaced by a Const */ + if (opt == HOOK_OPT_CONFIRM && new_num_entries == 1) { + ir_op *op = get_irn_op(new_node_array[0]); - removed_due_opt(old_node_array[i], graph->opt_hash[xopt]); + if (op == op_Const || op == op_SymConst) + xopt = HOOK_OPT_CONFIRM_C; } /* if */ - } /* for */ + + removed_due_opt(old_node_array[i], graph->opt_hash[xopt]); + } /* if */ } /* for */ } STAT_LEAVE; -- 2.20.1