aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index 722259d..48d8b34 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -541,10 +541,20 @@ may_propagate_copy (tree dest, tree orig)
return false;
}
- return (!SSA_NAME_OCCURS_IN_ABNORMAL_PHI (dest)
- && (TREE_CODE (orig) != SSA_NAME
- || !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (orig))
- && !DECL_HARD_REGISTER (SSA_NAME_VAR (dest)));
+ /* 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 or if it
+ represents a hard register, then it cannot be replaced. */
+ if (TREE_CODE (dest) == SSA_NAME
+ && (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (dest)
+ || DECL_HARD_REGISTER (SSA_NAME_VAR (dest))))
+ return false;
+
+ /* Anything else is OK. */
+ return true;
}
/* Set the default definition for VAR to DEF. */