diff options
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r-- | gcc/tree-ssa-propagate.c | 11 |
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" |