diff options
author | Reid Kleckner <rnk@google.com> | 2016-05-02 19:43:22 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-05-02 19:43:22 +0000 |
commit | bca59d2a4334013e5fc04e7d01e57e0c9e00e026 (patch) | |
tree | 58d28f97d9e4bd1ef07b494b575efd0b0e54075a /llvm/lib/Transforms/Utils/SimplifyCFG.cpp | |
parent | ce5e994887f7700da3b22bd1b027f52092e5cabb (diff) | |
download | bcm5719-llvm-bca59d2a4334013e5fc04e7d01e57e0c9e00e026.tar.gz bcm5719-llvm-bca59d2a4334013e5fc04e7d01e57e0c9e00e026.zip |
Revert "[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block including lifetime intrinsics"
This reverts commit r268254.
This change causes assertion failures while building Chromium. Reduced
test case coming soon.
llvm-svn: 268288
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 7454a9607fe..6ac039d8a1a 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -5056,15 +5056,14 @@ bool SimplifyCFGOpt::SimplifyUncondBranch(BranchInst *BI, IRBuilder<> &Builder){ if (SinkCommon && SinkThenElseCodeToEnd(BI)) return true; - // If the Terminator is the only non-phi instruction except for bitcast - // instruction coupled with the following lifetime intrinsic, simplify the - // block. If LoopHeader is provided, check if the block is a loop header + + // If the Terminator is the only non-phi instruction, simplify the block. + // if LoopHeader is provided, check if the block is a loop header // (This is for early invocations before loop simplify and vectorization // to keep canonical loop forms for nested loops. // These blocks can be eliminated when the pass is invoked later // in the back-end.) - BasicBlock::iterator I = - BB->getFirstNonPHIOrDbgOrLifetimeOrBitCast()->getIterator(); + BasicBlock::iterator I = BB->getFirstNonPHIOrDbg()->getIterator(); if (I->isTerminator() && BB != &BB->getParent()->getEntryBlock() && (!LoopHeaders || !LoopHeaders->count(BB)) && TryToSimplifyUncondBranchFromEmptyBlock(BB)) |