aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-09-09 11:52:51 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-09-09 11:52:51 +0000
commit59401b92b3a5ed70b653199c52cef6e8b0458ed5 (patch)
treec282772d3ec2eb3a961c9a3e6b384f035193577f /gcc/gimple-fold.c
parentcf13d9cf5071386d37ea4d5687d05b83fc9cc2b7 (diff)
downloadgcc-59401b92b3a5ed70b653199c52cef6e8b0458ed5.zip
gcc-59401b92b3a5ed70b653199c52cef6e8b0458ed5.tar.gz
gcc-59401b92b3a5ed70b653199c52cef6e8b0458ed5.tar.bz2
gimple.h (fold_stmt_inplace): Adjust to take a gimple_stmt_iterator instead of a statement.
2011-09-09 Richard Guenther <rguenther@suse.de> * 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
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r--gcc/gimple-fold.c12
1 files changed, 6 insertions, 6 deletions
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;
}