diff options
author | Fangrui Song <maskray@google.com> | 2019-07-12 14:58:15 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-07-12 14:58:15 +0000 |
commit | b251cc0d91362ea44f00a0138998a0272791f7dc (patch) | |
tree | fb2f4a2e59243cd19de79db04acf1e1e408e9661 /llvm/lib/Transforms | |
parent | a196469e67ce578df4fc9f348cc5b7221f12b239 (diff) | |
download | bcm5719-llvm-b251cc0d91362ea44f00a0138998a0272791f7dc.tar.gz bcm5719-llvm-b251cc0d91362ea44f00a0138998a0272791f7dc.zip |
Delete dead stores
llvm-svn: 365903
Diffstat (limited to 'llvm/lib/Transforms')
4 files changed, 5 insertions, 12 deletions
diff --git a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp index cf473c6c520..997d6883815 100644 --- a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp +++ b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp @@ -859,7 +859,7 @@ LoopStructure::parseLoopStructure(ScalarEvolution &SE, assert(!StepCI->isZero() && "Zero step?"); bool IsIncreasing = !StepCI->isNegative(); - bool IsSignedPredicate = ICmpInst::isSigned(Pred); + bool IsSignedPredicate; const SCEV *StartNext = IndVarBase->getStart(); const SCEV *Addend = SE.getNegativeSCEV(IndVarBase->getStepRecurrence(SE)); const SCEV *IndVarStart = SE.getAddExpr(StartNext, Addend); diff --git a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp index 3dbb1ebebd7..9a42365adc1 100644 --- a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp +++ b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp @@ -1264,9 +1264,7 @@ bool LoopInterchangeTransform::transform() { } void LoopInterchangeTransform::splitInnerLoopLatch(Instruction *Inc) { - BasicBlock *InnerLoopLatch = InnerLoop->getLoopLatch(); - BasicBlock *InnerLoopLatchPred = InnerLoopLatch; - InnerLoopLatch = SplitBlock(InnerLoopLatchPred, Inc, DT, LI); + SplitBlock(InnerLoop->getLoopLatch(), Inc, DT, LI); } /// \brief Move all instructions except the terminator from FromBB right before diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 6e4be9ea727..a7f0f7ac5d6 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1499,7 +1499,7 @@ void llvm::updateProfileCallee( return; uint64_t priorEntryCount = CalleeCount.getCount(); - uint64_t newEntryCount = priorEntryCount; + uint64_t newEntryCount; // Since CallSiteCount is an estimate, it could exceed the original callee // count and has to be set to 0 so guard against underflow. diff --git a/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp b/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp index 19daa050d1c..4273080ddd9 100644 --- a/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp @@ -1152,13 +1152,8 @@ bool Vectorizer::vectorizeLoadChain( vectorizeLoadChain(Chains.second, InstructionsProcessed); } - unsigned NewAlign = getOrEnforceKnownAlignment(L0->getPointerOperand(), - StackAdjustedAlignment, - DL, L0, nullptr, &DT); - if (NewAlign != 0) - Alignment = NewAlign; - - Alignment = NewAlign; + Alignment = getOrEnforceKnownAlignment( + L0->getPointerOperand(), StackAdjustedAlignment, DL, L0, nullptr, &DT); } if (!TTI.isLegalToVectorizeLoadChain(SzInBytes, Alignment, AS)) { |