summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-copy.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-10 16:59:06 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-10 16:59:06 +0000
commit5c6e497432adc5aec4703f28f7b17e21ad1223a3 (patch)
treeafc9546800253c22fc041a6064d3cc8ed6f5848e /gcc/tree-ssa-copy.c
parentcd6659e35b84844107b596f98d8c18a654e82966 (diff)
downloadgcc-5c6e497432adc5aec4703f28f7b17e21ad1223a3.tar.gz
2008-01-10 Richard Guenther <rguenther@suse.de>
PR middle-end/34683 * tree-cfg.c (tree_merge_blocks): Do not go through the full-blown folding and stmt updating path if we just deal with virtual operands. * tree-ssa-copy.c (may_propagate_copy): Do not short-cut test for abnormal SSA_NAMEs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131446 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-copy.c')
-rw-r--r--gcc/tree-ssa-copy.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index ae4f50c2feb..7ae6825d3e6 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -62,6 +62,17 @@ may_propagate_copy (tree dest, tree orig)
tree type_d = TREE_TYPE (dest);
tree type_o = TREE_TYPE (orig);
+ /* If ORIG flows in from an abnormal edge, it cannot be propagated. */
+ if (TREE_CODE (orig) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (orig))
+ return false;
+
+ /* If DEST is an SSA_NAME that flows from an abnormal edge, then it
+ cannot be replaced. */
+ if (TREE_CODE (dest) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (dest))
+ return false;
+
/* For memory partitions, copies are OK as long as the memory symbol
belongs to the partition. */
if (TREE_CODE (dest) == SSA_NAME
@@ -164,17 +175,6 @@ may_propagate_copy (tree dest, tree orig)
return false;
}
- /* If ORIG flows in from an abnormal edge, it cannot be propagated. */
- if (TREE_CODE (orig) == SSA_NAME
- && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (orig))
- return false;
-
- /* If DEST is an SSA_NAME that flows from an abnormal edge, then it
- cannot be replaced. */
- if (TREE_CODE (dest) == SSA_NAME
- && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (dest))
- return false;
-
/* Anything else is OK. */
return true;
}