summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-propagate.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-18 09:11:57 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-18 09:11:57 +0000
commit33a34f1ef6395c12c11acca6208647125e7591f5 (patch)
tree83538444d7fbc9ef0738dcdc51ef7f037ae7288b /gcc/tree-ssa-propagate.c
parent30641a0808b44eda78d976e63a15cac86cfbc877 (diff)
downloadgcc-33a34f1ef6395c12c11acca6208647125e7591f5.tar.gz
* tree-ssa-ccp.c (ccp_finalize): Return if something changed.
(execute_ssa_ccp): Return flags conditionally. * tree-ssa-propagate.c (substitue_and_fold): Return if something was changed. * tree-ssa-propagate.h (substitute_and_fold): Update prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120894 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r--gcc/tree-ssa-propagate.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index 68c1b51ea16..040d972cf4f 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -1137,15 +1137,18 @@ fold_predicate_in (tree stmt)
expressions are evaluated with a call to vrp_evaluate_conditional.
This will only give meaningful results when called from tree-vrp.c
(the information used by vrp_evaluate_conditional is built by the
- VRP pass). */
+ VRP pass).
-void
+ Return TRUE when something changed. */
+
+bool
substitute_and_fold (prop_value_t *prop_value, bool use_ranges_p)
{
basic_block bb;
+ bool something_changed = false;
if (prop_value == NULL && !use_ranges_p)
- return;
+ return false;
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "\nSubstituing values and folding statements\n\n");
@@ -1234,6 +1237,7 @@ substitute_and_fold (prop_value_t *prop_value, bool use_ranges_p)
/* Determine what needs to be done to update the SSA form. */
pop_stmt_changes (bsi_stmt_ptr (i));
+ something_changed = true;
}
else
{
@@ -1261,6 +1265,7 @@ substitute_and_fold (prop_value_t *prop_value, bool use_ranges_p)
fprintf (dump_file, "Predicates folded: %6ld\n",
prop_stats.num_pred_folded);
}
+ return something_changed;
}
#include "gt-tree-ssa-propagate.h"