aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTres Popp <tpopp@google.com>2021-07-27 15:43:04 +0200
committerTres Popp <tpopp@google.com>2021-07-27 15:43:06 +0200
commitd9e3449aa82541d289f4843617e23e93800bc278 (patch)
treee21eefa8deb7a54ac352ebb792673a4b4efc6911
parent68ffed12b7e29c498e5b6d563a218f8710c46e61 (diff)
downloadllvm-d9e3449aa82541d289f4843617e23e93800bc278.zip
llvm-d9e3449aa82541d289f4843617e23e93800bc278.tar.gz
llvm-d9e3449aa82541d289f4843617e23e93800bc278.tar.bz2
Handle unused variable when assertions are disabled
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 51ce280..5f21038 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -3150,7 +3150,7 @@ void LSRInstance::CollectChains() {
void LSRInstance::FinalizeChain(IVChain &Chain) {
assert(!Chain.Incs.empty() && "empty IV chains are not allowed");
LLVM_DEBUG(dbgs() << "Final Chain: " << *Chain.Incs[0].UserInst << "\n");
-
+
for (const IVInc &Inc : Chain) {
LLVM_DEBUG(dbgs() << " Inc: " << *Inc.UserInst << "\n");
auto UseI = find(Inc.UserInst->operands(), Inc.IVOperand);
@@ -4544,7 +4544,7 @@ void LSRInstance::NarrowSearchSpaceByDetectingSupersets() {
/// When there are many registers for expressions like A, A+1, A+2, etc.,
/// allocate a single register for them.
void LSRInstance::NarrowSearchSpaceByCollapsingUnrolledCode() {
- if (EstimateSearchSpaceComplexity() < ComplexityLimit)
+ if (EstimateSearchSpaceComplexity() < ComplexityLimit)
return;
LLVM_DEBUG(
@@ -6232,9 +6232,9 @@ static llvm::PHINode *GetInductionVariable(const Loop &L, ScalarEvolution &SE,
assert(isa<PHINode>(&*IV) && "Expected PhI node.");
if (SE.isSCEVable((*IV).getType())) {
PHINode *Phi = dyn_cast<PHINode>(&*IV);
- const llvm::SCEV *S = SE.getSCEV(Phi);
- LLVM_DEBUG(dbgs() << "scev-salvage: IV : " << *IV << "with SCEV: " << *S
- << "\n");
+ LLVM_DEBUG(const llvm::SCEV *S = SE.getSCEV(Phi);
+ dbgs() << "scev-salvage: IV : " << *IV << "with SCEV: " << *S
+ << "\n");
return Phi;
}
}