diff options
author | James Molloy <james.molloy@arm.com> | 2015-09-02 10:15:27 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2015-09-02 10:15:27 +0000 |
commit | aca2f400ba94227bb17ff89155b0153979aac38c (patch) | |
tree | b132519384fbc5db9d6d9a68a13d7bafd3228dd8 | |
parent | cba9230507439fd48648ac2b4db73a59c8146295 (diff) | |
download | bcm5719-llvm-aca2f400ba94227bb17ff89155b0153979aac38c.tar.gz bcm5719-llvm-aca2f400ba94227bb17ff89155b0153979aac38c.zip |
[LV] Cleanup: Sink an IRBuilder closer to its uses.
NFC.
llvm-svn: 246635
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index de0f1f0179d..6d4a134aa67 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -2881,12 +2881,6 @@ void InnerLoopVectorizer::createEmptyLoop() { createInductionVariable(Lp, StartIdx, CountRoundDown, Step, getDebugLocFromInstOrOperands(OldInduction)); - // This is the IR builder that we use to add all of the logic for bypassing - // the new vector loop. - IRBuilder<> BypassBuilder(LoopBypassBlocks.back()->getTerminator()); - setDebugLocFromInst(BypassBuilder, - getDebugLocFromInstOrOperands(OldInduction)); - // We are going to resume the execution of the scalar loop. // Go over all of the induction variables that we found and fix the // PHIs that are left in the scalar version of the loop. @@ -2920,10 +2914,11 @@ void InnerLoopVectorizer::createEmptyLoop() { // We also know which PHI node holds it. ResumeIndex = ResumeVal; } else { - Value *CRD = BypassBuilder.CreateSExtOrTrunc(CountRoundDown, - II.getStepValue()->getType(), - "cast.crd"); - EndValue = II.transform(BypassBuilder, CRD); + IRBuilder<> B(LoopBypassBlocks.back()->getTerminator()); + Value *CRD = B.CreateSExtOrTrunc(CountRoundDown, + II.getStepValue()->getType(), + "cast.crd"); + EndValue = II.transform(B, CRD); EndValue->setName("ind.end"); } |