Skip to content

Commit 9ff7011

Browse files
committed
[LoopVectorizer] Silence warning in GetRegUsage.
This patch silences the warning: error: lambda capture 'DL' is not used [-Werror,-Wunused-lambda-capture] auto GetRegUsage = [&DL, &TTI=TTI](Type *Ty, ElementCount VF) { ~^~~ 1 error generated. Introduced in: https://reviews.llvm.org/rGb873aba3943c067a5efd5303cbdf5aeb0732cf88
1 parent c3b1395 commit 9ff7011

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5793,15 +5793,14 @@ LoopVectorizationCostModel::calculateRegisterUsage(ArrayRef<ElementCount> VFs) {
57935793
unsigned MaxSafeDepDist = -1U;
57945794
if (Legal->getMaxSafeDepDistBytes() != -1U)
57955795
MaxSafeDepDist = Legal->getMaxSafeDepDistBytes() * 8;
5796-
const DataLayout &DL = TheFunction->getParent()->getDataLayout();
57975796

57985797
SmallVector<RegisterUsage, 8> RUs(VFs.size());
57995798
SmallVector<SmallMapVector<unsigned, unsigned, 4>, 8> MaxUsages(VFs.size());
58005799

58015800
LLVM_DEBUG(dbgs() << "LV(REG): Calculating max register usage:\n");
58025801

58035802
// A lambda that gets the register usage for the given type and VF.
5804-
auto GetRegUsage = [&DL, &TTI=TTI](Type *Ty, ElementCount VF) {
5803+
auto GetRegUsage = [&TTI=TTI](Type *Ty, ElementCount VF) {
58055804
if (Ty->isTokenTy())
58065805
return 0U;
58075806
return TTI.getRegUsageForType(VectorType::get(Ty, VF));

0 commit comments

Comments
 (0)