[llvm] d9e3449 - Handle unused variable when assertions are disabled
Tres Popp via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 27 06:43:22 PDT 2021
Author: Tres Popp
Date: 2021-07-27T15:43:06+02:00
New Revision: d9e3449aa82541d289f4843617e23e93800bc278
URL: https://github.com/llvm/llvm-project/commit/d9e3449aa82541d289f4843617e23e93800bc278
DIFF: https://github.com/llvm/llvm-project/commit/d9e3449aa82541d289f4843617e23e93800bc278.diff
LOG: Handle unused variable when assertions are disabled
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 51ce2805ed38..5f210380ae5a 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;
}
}
More information about the llvm-commits
mailing list