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/tree-ssa-math-opts.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc/tree-ssa-math-opts.c') diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index b8591f9..ed99802 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -398,9 +398,10 @@ replace_reciprocal (use_operand_p use_p) if (optimize_bb_for_speed_p (bb) && occ->recip_def && use_stmt != occ->recip_def_stmt) { + gimple_stmt_iterator gsi = gsi_for_stmt (use_stmt); gimple_assign_set_rhs_code (use_stmt, MULT_EXPR); SET_USE (use_p, occ->recip_def); - fold_stmt_inplace (use_stmt); + fold_stmt_inplace (&gsi); update_stmt (use_stmt); } } @@ -610,8 +611,9 @@ execute_cse_reciprocals (void) FOR_EACH_IMM_USE_STMT (stmt, ui, arg1) { + gimple_stmt_iterator gsi = gsi_for_stmt (stmt); gimple_assign_set_rhs_code (stmt, MULT_EXPR); - fold_stmt_inplace (stmt); + fold_stmt_inplace (&gsi); update_stmt (stmt); } } -- cgit v1.1