From 7336e40862d97122e42ecbfd5e71f41b032e7c31 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Mon, 17 Dec 2007 14:21:50 +0000 Subject: [PATCH] fixed warning [r17003] --- ir/opt/funccall.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ir/opt/funccall.c b/ir/opt/funccall.c index 4fa65bef3..468157d4e 100644 --- a/ir/opt/funccall.c +++ b/ir/opt/funccall.c @@ -339,11 +339,10 @@ static unsigned _follow_mem(ir_node *node) { * the mtp_property. * * @return mtp_property_const if only calls of const functions are detected - * mtp_property_pure if only Loads and const/pure - * calls detected - * 0 else + * mtp_property_pure if only Loads and const/pure calls detected + * mtp_no_property else */ -static unsigned follow_mem(ir_graph *irg, ir_node *node, unsigned mode) { +static unsigned follow_mem(ir_node *node, unsigned mode) { unsigned m; m = _follow_mem(node); @@ -410,7 +409,7 @@ static unsigned check_const_or_pure_function(ir_graph *irg, int top) { continue; if (mem != get_irg_initial_mem(irg)) - mode = mode_max(mode, follow_mem(irg, mem, mode)); + mode = mode_max(mode, follow_mem(mem, mode)); } else { /* Exception found. Cannot be const or pure. */ mode = mtp_no_property; @@ -428,13 +427,13 @@ static unsigned check_const_or_pure_function(ir_graph *irg, int top) { if (mode_M != get_irn_mode(mem)) continue; - mode = mode_max(mode, follow_mem(irg, mem, mode)); + mode = mode_max(mode, follow_mem(mem, mode)); if (mode == mtp_no_property) break; } } - if (mode) { + if (mode != mtp_no_property) { if (top || (mode & mtp_temporary) == 0) { /* We use the temporary flag here to mark optimistic result. Set the property only if we are sure that it does NOT base on -- 2.20.1