From 59401b92b3a5ed70b653199c52cef6e8b0458ed5 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Fri, 9 Sep 2011 11:52:51 +0000 Subject: gimple.h (fold_stmt_inplace): Adjust to take a gimple_stmt_iterator instead of a statement. 2011-09-09 Richard Guenther * gimple.h (fold_stmt_inplace): Adjust to take a gimple_stmt_iterator instead of a statement. * gimple-fold.c (fold_stmt_inplace): Likewise. * sese.c (graphite_copy_stmts_from_block): Adjust. * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise. * tree-ssa-forwprop.c (forward_propagate_into_comparison): Use fold_stmt. (forward_propagate_addr_into_variable_array_index): Likewise. (forward_propagate_addr_expr_1): adjust. (associate_plusminus): Likewise. (ssa_forward_propagate_and_combine): Likewise. * tree-ssa-mathopts.c (replace_reciprocal): Adjust. (execute_cse_reciprocals): Likewise. * tree-ssa.c (insert_debug_temp_for_var_def): Adjust. From-SVN: r178726 --- gcc/gimple-fold.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gcc/gimple-fold.c') diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index 9500a6a..d8da030 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -1286,20 +1286,20 @@ fold_stmt (gimple_stmt_iterator *gsi) return fold_stmt_1 (gsi, false); } -/* Perform the minimal folding on statement STMT. Only operations like +/* Perform the minimal folding on statement *GSI. Only operations like *&x created by constant propagation are handled. The statement cannot be replaced with a new one. Return true if the statement was changed, false otherwise. - The statement STMT should be in valid gimple form but may + The statement *GSI should be in valid gimple form but may be in unfolded state as resulting from for example constant propagation which can produce *&x = 0. */ bool -fold_stmt_inplace (gimple stmt) +fold_stmt_inplace (gimple_stmt_iterator *gsi) { - gimple_stmt_iterator gsi = gsi_for_stmt (stmt); - bool changed = fold_stmt_1 (&gsi, true); - gcc_assert (gsi_stmt (gsi) == stmt); + gimple stmt = gsi_stmt (*gsi); + bool changed = fold_stmt_1 (gsi, true); + gcc_assert (gsi_stmt (*gsi) == stmt); return changed; } -- cgit v1.1