summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-23 07:23:18 +0000
committerChris Lattner <sabre@nondot.org>2005-09-23 07:23:18 +0000
commit3a978bf66d06ef854c8cc7c70ca1facdf006c6dd (patch)
tree54e1ab87f636e3b9e0cfcdf7a320dacaa816c3d4 /llvm/lib
parentcc14ebc17be5e5db7f221b456c7532186ec5e2cc (diff)
downloadbcm5719-llvm-3a978bf66d06ef854c8cc7c70ca1facdf006c6dd.tar.gz
bcm5719-llvm-3a978bf66d06ef854c8cc7c70ca1facdf006c6dd.zip
simplify some logic further
llvm-svn: 23408
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index a952422fc2b..72f878337ee 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1041,7 +1041,6 @@ static bool FoldTwoEntryPHINode(PHINode *PN) {
// that need to be moved to the dominating block.
std::set<Instruction*> AggressiveInsts;
- bool CanPromote = true;
BasicBlock::iterator AfterPHIIt = BB->begin();
while (isa<PHINode>(AfterPHIIt)) {
PHINode *PN = cast<PHINode>(AfterPHIIt++);
@@ -1054,14 +1053,10 @@ static bool FoldTwoEntryPHINode(PHINode *PN) {
&AggressiveInsts) ||
!DominatesMergePoint(PN->getIncomingValue(1), BB,
&AggressiveInsts)) {
- CanPromote = false;
+ return false;
}
}
- // Did we eliminate all PHI's?
- if (!CanPromote && AfterPHIIt != BB->begin())
- return false;
-
// If we all PHI nodes are promotable, check to make sure that all
// instructions in the predecessor blocks can be promoted as well. If
// not, we won't be able to get rid of the control flow, so it's not
OpenPOWER on IntegriCloud