diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-05-21 20:40:30 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-05-21 20:40:30 +0000 |
commit | 7ee91ca1adfd86a526a283985379ebf181bf5aa4 (patch) | |
tree | c89b46c77830e9dccb5055c4df3f989f6109c8cc /lib/VMCore | |
parent | aa8f28e0898de2a8c149b05e6710af05d2de3a04 (diff) | |
download | external_llvm-7ee91ca1adfd86a526a283985379ebf181bf5aa4.zip external_llvm-7ee91ca1adfd86a526a283985379ebf181bf5aa4.tar.gz external_llvm-7ee91ca1adfd86a526a283985379ebf181bf5aa4.tar.bz2 |
Fix some incorrect logic in DominanceFrontier::splitBlock. Part of
PR4238.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72223 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Dominators.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index 6f1de46..735a70c 100644 --- a/lib/VMCore/Dominators.cpp +++ b/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); } } |