summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-propagate.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-18 07:58:36 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-18 07:58:36 +0000
commit28e7c0f5f892ffd0f925b877bada596b43c409ff (patch)
treef05d3024998148eae0b1acf57f157ce6f955a2ca /gcc/tree-ssa-propagate.c
parent926f7a02cf54c290980c2eb8b77974337154bb6d (diff)
downloadgcc-28e7c0f5f892ffd0f925b877bada596b43c409ff.tar.gz
2014-06-18 Richard Biener <rguenther@suse.de>
* tree-ssa-propagate.c (replace_phi_args_in): Return whether we propagated anything. (substitute_and_fold_dom_walker::before_dom_children): Something changed if we propagated into PHI arguments. * tree-ssa-pre.c (eliminate): Always schedule cfg-cleanup if we removed a stmt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211770 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r--gcc/tree-ssa-propagate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index cdc9f6ad39b..eb65b18ce85 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -964,7 +964,7 @@ replace_uses_in (gimple stmt, ssa_prop_get_value_fn get_value)
/* Replace propagated values into all the arguments for PHI using the
values from PROP_VALUE. */
-static void
+static bool
replace_phi_args_in (gimple phi, ssa_prop_get_value_fn get_value)
{
size_t i;
@@ -1015,6 +1015,8 @@ replace_phi_args_in (gimple phi, ssa_prop_get_value_fn get_value)
fprintf (dump_file, "\n");
}
}
+
+ return replaced;
}
@@ -1066,7 +1068,7 @@ substitute_and_fold_dom_walker::before_dom_children (basic_block bb)
continue;
}
}
- replace_phi_args_in (phi, get_value_fn);
+ something_changed |= replace_phi_args_in (phi, get_value_fn);
}
/* Propagate known values into stmts. In some case it exposes