[PATCH] D32224: [LV] Remove redundant basic block split
Gil Rapaport via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 23:10:20 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL301293: [LV] Remove redundant basic block split (authored by gilr).
Changed prior to commit:
https://reviews.llvm.org/D32224?vs=95732&id=96504#toc
Repository:
rL LLVM
https://reviews.llvm.org/D32224
Files:
llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
Index: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4516,14 +4516,15 @@
for (auto KV : PredicatedInstructions) {
BasicBlock::iterator I(KV.first);
BasicBlock *Head = I->getParent();
- auto *BB = SplitBlock(Head, &*std::next(I), DT, LI);
auto *T = SplitBlockAndInsertIfThen(KV.second, &*I, /*Unreachable=*/false,
/*BranchWeights=*/nullptr, DT, LI);
I->moveBefore(T);
sinkScalarOperands(&*I);
- I->getParent()->setName(Twine("pred.") + I->getOpcodeName() + ".if");
- BB->setName(Twine("pred.") + I->getOpcodeName() + ".continue");
+ BasicBlock *PredicatedBlock = I->getParent();
+ Twine BBNamePrefix = Twine("pred.") + I->getOpcodeName();
+ PredicatedBlock->setName(BBNamePrefix + ".if");
+ PredicatedBlock->getSingleSuccessor()->setName(BBNamePrefix + ".continue");
// If the instruction is non-void create a Phi node at reconvergence point.
if (!I->getType()->isVoidTy()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32224.96504.patch
Type: text/x-patch
Size: 1175 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170425/0294f674/attachment.bin>
More information about the llvm-commits
mailing list