summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-05-21 20:40:30 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-05-21 20:40:30 +0000
commit0ac904455e15edb67403e278c1e913f41f896e5c (patch)
tree661e8084bba56b88a922e0a3e4f43ff18cb28921 /llvm/lib
parent6d437694abc14cabf535c9a5cbc3e986eb93bdc2 (diff)
downloadbcm5719-llvm-0ac904455e15edb67403e278c1e913f41f896e5c.tar.gz
bcm5719-llvm-0ac904455e15edb67403e278c1e913f41f896e5c.zip
Fix some incorrect logic in DominanceFrontier::splitBlock. Part of
PR4238. llvm-svn: 72223
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/Dominators.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/Dominators.cpp b/llvm/lib/VMCore/Dominators.cpp
index 6f1de466043..735a70c5092 100644
--- a/llvm/lib/VMCore/Dominators.cpp
+++ b/llvm/lib/VMCore/Dominators.cpp
@@ -160,10 +160,7 @@ void DominanceFrontier::splitBlock(BasicBlock *NewBB) {
break;
}
}
-
- if (!BlockDominatesAny)
- continue;
-
+
// If NewBBSucc should not stay in our dominator frontier, remove it.
// We remove it unless there is a predecessor of NewBBSucc that we
// dominate, but we don't strictly dominate NewBBSucc.
@@ -181,7 +178,8 @@ void DominanceFrontier::splitBlock(BasicBlock *NewBB) {
if (ShouldRemove)
removeFromFrontier(DFI, NewBBSucc);
- addToFrontier(DFI, NewBB);
+ if (BlockDominatesAny && (&*FI == NewBB || !DT.dominates(FI, NewBB)))
+ addToFrontier(DFI, NewBB);
}
}
OpenPOWER on IntegriCloud