summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-copy.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-06-26 11:29:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-06-26 11:29:34 +0000
commit73c7d6bc25d9bb86bdb81283d237a5b94607ac8c (patch)
tree1c939200ec3ae5f46afa0de763e00de9f4d4e65b /gcc/tree-ssa-copy.c
parent1d805a56b6a5c2252baccd257e00a719a22ad143 (diff)
re PR tree-optimization/61607 (DOM missed jump threading and destroyed loops)
2014-06-26 Richard Biener <rguenther@suse.de> PR tree-optimization/61607 * tree-ssa-copy.c (copy_prop_visit_phi_node): Adjust comment explaining why we restrict copies on loop depth. * tree-ssa-dom.c (cprop_operand): Remove restriction on on loop depth. (record_equivalences_from_phis): Instead add it here. * gcc.dg/tree-ssa/ssa-dom-thread-5.c: New testcase. From-SVN: r212026
Diffstat (limited to 'gcc/tree-ssa-copy.c')
-rw-r--r--gcc/tree-ssa-copy.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index 1d404d27b14..0ba665bbe91 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -401,11 +401,8 @@ copy_prop_visit_phi_node (gimple phi)
arg_value = valueize_val (arg);
/* Avoid copy propagation from an inner into an outer loop.
- Otherwise, this may move loop variant variables outside of
- their loops and prevent coalescing opportunities. If the
- value was loop invariant, it will be hoisted by LICM and
- exposed for copy propagation.
- ??? The value will be always loop invariant.
+ Otherwise, this may introduce uses of loop variant variables
+ outside of their loops and prevent coalescing opportunities.
In loop-closed SSA form do not copy-propagate through
PHI nodes in blocks with a loop exit edge predecessor. */
if (TREE_CODE (arg_value) == SSA_NAME