From 9fa59e7643d63bbc95c1e011c7403bbe1555c861 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 9 Aug 2022 13:33:53 +0200 Subject: [PATCH] [mlir] Use C++17 structured bindings instead of std::tie where applicable. NFCI --- mlir/include/mlir/ExecutionEngine/MemRefUtils.h | 3 +-- mlir/lib/Analysis/DataFlowFramework.cpp | 5 +---- mlir/lib/Analysis/Presburger/IntegerRelation.cpp | 3 +-- mlir/lib/Analysis/Presburger/Simplex.cpp | 4 +--- mlir/lib/AsmParser/DialectSymbolParser.cpp | 4 +--- mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp | 8 ++------ .../Conversion/MemRefToLLVM/AllocLikeConversion.cpp | 4 +--- .../SCFToControlFlow/SCFToControlFlow.cpp | 4 +--- .../Arithmetic/IR/InferIntRangeInterfaceImpls.cpp | 15 ++++++--------- mlir/lib/Dialect/GPU/IR/GPUDialect.cpp | 4 +--- mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp | 4 +--- mlir/lib/Dialect/SCF/IR/SCF.cpp | 21 ++++++++------------- .../Dialect/SCF/Transforms/ParallelLoopTiling.cpp | 8 ++------ mlir/lib/Dialect/Shape/IR/Shape.cpp | 5 ++--- mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp | 4 +--- mlir/lib/Support/DebugCounter.cpp | 3 +-- mlir/lib/TableGen/Pattern.cpp | 3 +-- mlir/lib/Tools/PDLL/Parser/Parser.cpp | 4 +--- mlir/lib/Transforms/OpStats.cpp | 5 ++--- mlir/lib/Transforms/Utils/DialectConversion.cpp | 8 ++------ 20 files changed, 37 insertions(+), 82 deletions(-) diff --git a/mlir/include/mlir/ExecutionEngine/MemRefUtils.h b/mlir/include/mlir/ExecutionEngine/MemRefUtils.h index 1231da5..be33aaf 100644 --- a/mlir/include/mlir/ExecutionEngine/MemRefUtils.h +++ b/mlir/include/mlir/ExecutionEngine/MemRefUtils.h @@ -162,8 +162,7 @@ public: int64_t nElements = 1; for (int64_t s : shapeAlloc) nElements *= s; - T *data, *alignedData; - std::tie(data, alignedData) = + auto [data, alignedData] = detail::allocAligned(nElements, allocFun, alignment); descriptor = detail::makeStridedMemRefDescriptor(data, alignedData, shape, shapeAlloc); diff --git a/mlir/lib/Analysis/DataFlowFramework.cpp b/mlir/lib/Analysis/DataFlowFramework.cpp index 18d9ba1..9c8a889 100644 --- a/mlir/lib/Analysis/DataFlowFramework.cpp +++ b/mlir/lib/Analysis/DataFlowFramework.cpp @@ -72,13 +72,10 @@ LogicalResult DataFlowSolver::initializeAndRun(Operation *top) { } // Run the analysis until fixpoint. - ProgramPoint point; - DataFlowAnalysis *analysis; - do { // Exhaust the worklist. while (!worklist.empty()) { - std::tie(point, analysis) = worklist.front(); + auto [point, analysis] = worklist.front(); worklist.pop(); DATAFLOW_DEBUG(llvm::dbgs() << "Invoking '" << analysis->debugName diff --git a/mlir/lib/Analysis/Presburger/IntegerRelation.cpp b/mlir/lib/Analysis/Presburger/IntegerRelation.cpp index cb1c13a..3e19a49 100644 --- a/mlir/lib/Analysis/Presburger/IntegerRelation.cpp +++ b/mlir/lib/Analysis/Presburger/IntegerRelation.cpp @@ -1108,8 +1108,7 @@ Optional IntegerRelation::computeVolume() const { bool hasUnboundedVar = false; for (unsigned i = 0, e = getNumDimAndSymbolVars(); i < e; ++i) { dim[i] = 1; - MaybeOptimum min, max; - std::tie(min, max) = simplex.computeIntegerBounds(dim); + auto [min, max] = simplex.computeIntegerBounds(dim); dim[i] = 0; assert((!min.isEmpty() && !max.isEmpty()) && diff --git a/mlir/lib/Analysis/Presburger/Simplex.cpp b/mlir/lib/Analysis/Presburger/Simplex.cpp index 61e8761..67fb608 100644 --- a/mlir/lib/Analysis/Presburger/Simplex.cpp +++ b/mlir/lib/Analysis/Presburger/Simplex.cpp @@ -1990,9 +1990,7 @@ Optional> Simplex::findIntegerSample() { llvm::to_vector<8>(basis.getRow(level)); basisCoeffs.emplace_back(0); - MaybeOptimum minRoundedUp, maxRoundedDown; - std::tie(minRoundedUp, maxRoundedDown) = - computeIntegerBounds(basisCoeffs); + auto [minRoundedUp, maxRoundedDown] = computeIntegerBounds(basisCoeffs); // We don't have any integer values in the range. // Pop the stack and return up a level. diff --git a/mlir/lib/AsmParser/DialectSymbolParser.cpp b/mlir/lib/AsmParser/DialectSymbolParser.cpp index f38ce43..8f1d69b 100644 --- a/mlir/lib/AsmParser/DialectSymbolParser.cpp +++ b/mlir/lib/AsmParser/DialectSymbolParser.cpp @@ -160,9 +160,7 @@ static Symbol parseExtendedSymbol(Parser &p, SymbolAliasMap &aliases, p.consumeToken(); // Check to see if this is a pretty name. - StringRef dialectName; - StringRef symbolData; - std::tie(dialectName, symbolData) = identifier.split('.'); + auto [dialectName, symbolData] = identifier.split('.'); bool isPrettyName = !symbolData.empty() || identifier.back() == '.'; // Check to see if the symbol has trailing data, i.e. has an immediately diff --git a/mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp b/mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp index 53da615..039a5fd 100644 --- a/mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp +++ b/mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp @@ -131,9 +131,7 @@ static void wrapForExternalCallers(OpBuilder &rewriter, Location loc, SmallVector attributes; filterFuncAttributes(funcOp->getAttrs(), /*filterArgAndResAttrs=*/false, attributes); - Type wrapperFuncType; - bool resultIsNowArg; - std::tie(wrapperFuncType, resultIsNowArg) = + auto [wrapperFuncType, resultIsNowArg] = typeConverter.convertFunctionTypeCWrapper(type); if (resultIsNowArg) prependResAttrsToArgAttrs(rewriter, attributes, funcOp.getNumArguments()); @@ -189,9 +187,7 @@ static void wrapExternalFunction(OpBuilder &builder, Location loc, LLVM::LLVMFuncOp newFuncOp) { OpBuilder::InsertionGuard guard(builder); - Type wrapperType; - bool resultIsNowArg; - std::tie(wrapperType, resultIsNowArg) = + auto [wrapperType, resultIsNowArg] = typeConverter.convertFunctionTypeCWrapper(funcOp.getFunctionType()); // This conversion can only fail if it could not convert one of the argument // types. But since it has been applied to a non-wrapper function before, it diff --git a/mlir/lib/Conversion/MemRefToLLVM/AllocLikeConversion.cpp b/mlir/lib/Conversion/MemRefToLLVM/AllocLikeConversion.cpp index fa32f8f..d2778b7 100644 --- a/mlir/lib/Conversion/MemRefToLLVM/AllocLikeConversion.cpp +++ b/mlir/lib/Conversion/MemRefToLLVM/AllocLikeConversion.cpp @@ -39,9 +39,7 @@ LogicalResult AllocLikeOpLLVMLowering::matchAndRewrite( strides, sizeBytes); // Allocate the underlying buffer. - Value allocatedPtr; - Value alignedPtr; - std::tie(allocatedPtr, alignedPtr) = + auto [allocatedPtr, alignedPtr] = this->allocateBuffer(rewriter, loc, sizeBytes, op); // Create the MemRef descriptor. diff --git a/mlir/lib/Conversion/SCFToControlFlow/SCFToControlFlow.cpp b/mlir/lib/Conversion/SCFToControlFlow/SCFToControlFlow.cpp index 68f8e1b..8bdf683 100644 --- a/mlir/lib/Conversion/SCFToControlFlow/SCFToControlFlow.cpp +++ b/mlir/lib/Conversion/SCFToControlFlow/SCFToControlFlow.cpp @@ -458,11 +458,9 @@ ParallelLowering::matchAndRewrite(ParallelOp parallelOp, ivs.reserve(parallelOp.getNumLoops()); bool first = true; SmallVector loopResults(iterArgs); - for (auto loopOperands : + for (auto [iv, lower, upper, step] : llvm::zip(parallelOp.getInductionVars(), parallelOp.getLowerBound(), parallelOp.getUpperBound(), parallelOp.getStep())) { - Value iv, lower, upper, step; - std::tie(iv, lower, upper, step) = loopOperands; ForOp forOp = rewriter.create(loc, lower, upper, step, iterArgs); ivs.push_back(forOp.getInductionVar()); auto iterRange = forOp.getRegionIterArgs(); diff --git a/mlir/lib/Dialect/Arithmetic/IR/InferIntRangeInterfaceImpls.cpp b/mlir/lib/Dialect/Arithmetic/IR/InferIntRangeInterfaceImpls.cpp index 2a877e3..0c887e8 100644 --- a/mlir/lib/Dialect/Arithmetic/IR/InferIntRangeInterfaceImpls.cpp +++ b/mlir/lib/Dialect/Arithmetic/IR/InferIntRangeInterfaceImpls.cpp @@ -368,9 +368,8 @@ widenBitwiseBounds(const ConstantIntRanges &bound) { void arith::AndIOp::inferResultRanges(ArrayRef argRanges, SetIntRangeFn setResultRange) { - APInt lhsZeros, lhsOnes, rhsZeros, rhsOnes; - std::tie(lhsZeros, lhsOnes) = widenBitwiseBounds(argRanges[0]); - std::tie(rhsZeros, rhsOnes) = widenBitwiseBounds(argRanges[1]); + auto [lhsZeros, lhsOnes] = widenBitwiseBounds(argRanges[0]); + auto [rhsZeros, rhsOnes] = widenBitwiseBounds(argRanges[1]); auto andi = [](const APInt &a, const APInt &b) -> Optional { return a & b; }; @@ -385,9 +384,8 @@ void arith::AndIOp::inferResultRanges(ArrayRef argRanges, void arith::OrIOp::inferResultRanges(ArrayRef argRanges, SetIntRangeFn setResultRange) { - APInt lhsZeros, lhsOnes, rhsZeros, rhsOnes; - std::tie(lhsZeros, lhsOnes) = widenBitwiseBounds(argRanges[0]); - std::tie(rhsZeros, rhsOnes) = widenBitwiseBounds(argRanges[1]); + auto [lhsZeros, lhsOnes] = widenBitwiseBounds(argRanges[0]); + auto [rhsZeros, rhsOnes] = widenBitwiseBounds(argRanges[1]); auto ori = [](const APInt &a, const APInt &b) -> Optional { return a | b; }; @@ -402,9 +400,8 @@ void arith::OrIOp::inferResultRanges(ArrayRef argRanges, void arith::XOrIOp::inferResultRanges(ArrayRef argRanges, SetIntRangeFn setResultRange) { - APInt lhsZeros, lhsOnes, rhsZeros, rhsOnes; - std::tie(lhsZeros, lhsOnes) = widenBitwiseBounds(argRanges[0]); - std::tie(rhsZeros, rhsOnes) = widenBitwiseBounds(argRanges[1]); + auto [lhsZeros, lhsOnes] = widenBitwiseBounds(argRanges[0]); + auto [rhsZeros, rhsOnes] = widenBitwiseBounds(argRanges[1]); auto xori = [](const APInt &a, const APInt &b) -> Optional { return a ^ b; }; diff --git a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp index 833164a..d102dbe 100644 --- a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp +++ b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp @@ -1040,9 +1040,7 @@ LogicalResult gpu::ReturnOp::verify() { for (const auto &pair : llvm::enumerate( llvm::zip(function.getFunctionType().getResults(), operands()))) { - Type type; - Value operand; - std::tie(type, operand) = pair.value(); + auto [type, operand] = pair.value(); if (type != operand.getType()) return emitOpError() << "unexpected type `" << operand.getType() << "' for operand #" << pair.index(); diff --git a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp index dc836f8..ddcc347 100644 --- a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp @@ -415,9 +415,7 @@ tileLinalgOpImpl(RewriterBase &b, LinalgOp op, ArrayRef tileSizes, if (!shapeSizesToLoopsMap) return failure(); - SmallVector loopRanges; - LoopIndexToRangeIndexMap loopIndexToRangeIndex; - std::tie(loopRanges, loopIndexToRangeIndex) = makeTiledLoopRanges( + auto [loopRanges, loopIndexToRangeIndex] = makeTiledLoopRanges( b, op.getLoc(), shapeSizesToLoopsMap, allShapeSizes, tileSizes); SmallVector iteratorTypes; diff --git a/mlir/lib/Dialect/SCF/IR/SCF.cpp b/mlir/lib/Dialect/SCF/IR/SCF.cpp index 6280498..607811a 100644 --- a/mlir/lib/Dialect/SCF/IR/SCF.cpp +++ b/mlir/lib/Dialect/SCF/IR/SCF.cpp @@ -1741,11 +1741,9 @@ struct ReplaceIfYieldWithConditionOrValue : public OpRewritePattern { op.getOperation()->getIterator()); bool changed = false; Type i1Ty = rewriter.getI1Type(); - for (auto tup : llvm::zip(trueYield.getResults(), falseYield.getResults(), - op.getResults())) { - Value trueResult, falseResult, opResult; - std::tie(trueResult, falseResult, opResult) = tup; - + for (auto [trueResult, falseResult, opResult] : + llvm::zip(trueYield.getResults(), falseYield.getResults(), + op.getResults())) { if (trueResult == falseResult) { if (!opResult.use_empty()) { opResult.replaceAllUsesWith(trueResult); @@ -2315,10 +2313,9 @@ struct CollapseSingleIterationLoops : public OpRewritePattern { newLowerBounds.reserve(op.getLowerBound().size()); newUpperBounds.reserve(op.getUpperBound().size()); newSteps.reserve(op.getStep().size()); - for (auto dim : llvm::zip(op.getLowerBound(), op.getUpperBound(), - op.getStep(), op.getInductionVars())) { - Value lowerBound, upperBound, step, iv; - std::tie(lowerBound, upperBound, step, iv) = dim; + for (auto [lowerBound, upperBound, step, iv] : + llvm::zip(op.getLowerBound(), op.getUpperBound(), op.getStep(), + op.getInductionVars())) { // Collect the statically known loop bounds. auto lowerBoundConstant = dyn_cast_or_null(lowerBound.getDefiningOp()); @@ -2823,8 +2820,7 @@ struct RemoveLoopInvariantArgsFromBeforeBlock for (const auto &it : llvm::enumerate(llvm::zip(op.getOperands(), yieldOpArgs))) { auto index = static_cast(it.index()); - Value initVal, yieldOpArg; - std::tie(initVal, yieldOpArg) = it.value(); + auto [initVal, yieldOpArg] = it.value(); // If i-th yield operand is equal to the i-th operand of the scf.while, // the i-th before block argument is a loop invariant. if (yieldOpArg == initVal) { @@ -2855,8 +2851,7 @@ struct RemoveLoopInvariantArgsFromBeforeBlock for (const auto &it : llvm::enumerate(llvm::zip(op.getOperands(), yieldOpArgs))) { auto index = static_cast(it.index()); - Value initVal, yieldOpArg; - std::tie(initVal, yieldOpArg) = it.value(); + auto [initVal, yieldOpArg] = it.value(); // If i-th yield operand is equal to the i-th operand of the scf.while, // the i-th before block argument is a loop invariant. diff --git a/mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp b/mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp index c39d3af..355049d 100644 --- a/mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp +++ b/mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp @@ -89,12 +89,10 @@ mlir::scf::tileParallelLoop(ParallelOp op, ArrayRef tileSizes, SmallVector newBounds; newBounds.reserve(op.getUpperBound().size()); bool needInboundCheck = false; - for (auto dim : + for (auto [lowerBound, upperBound, newStep, iv, step, tileSizeConstant] : llvm::zip(outerLoop.getLowerBound(), outerLoop.getUpperBound(), outerLoop.getStep(), outerLoop.getInductionVars(), op.getStep(), tileSizeConstants)) { - Value lowerBound, upperBound, newStep, iv, step, tileSizeConstant; - std::tie(lowerBound, upperBound, newStep, iv, step, tileSizeConstant) = dim; // Collect the statically known loop bounds auto lowerBoundConstant = dyn_cast_or_null(lowerBound.getDefiningOp()); @@ -139,11 +137,9 @@ mlir::scf::tileParallelLoop(ParallelOp op, ArrayRef tileSizes, // Insert in-bound check Value inbound = b.create(op.getLoc(), 1, b.getIntegerType(1)); - for (auto dim : + for (auto [outerUpperBound, outerIV, innerIV, innerStep] : llvm::zip(outerLoop.getUpperBound(), outerLoop.getInductionVars(), innerLoop.getInductionVars(), innerLoop.getStep())) { - Value outerUpperBound, outerIV, innerIV, innerStep; - std::tie(outerUpperBound, outerIV, innerIV, innerStep) = dim; // %in_bound = %in_bound && // (%inner_iv * %inner_step + %outer_iv < %outer_upper_bound) Value index = b.create( diff --git a/mlir/lib/Dialect/Shape/IR/Shape.cpp b/mlir/lib/Dialect/Shape/IR/Shape.cpp index 0369a55..ce1767b 100644 --- a/mlir/lib/Dialect/Shape/IR/Shape.cpp +++ b/mlir/lib/Dialect/Shape/IR/Shape.cpp @@ -292,9 +292,8 @@ struct AssumingOpRemoveUnusedResults : public OpRewritePattern { // Find used values. SmallVector newYieldOperands; - Value opResult, yieldOperand; - for (auto it : llvm::zip(op.getResults(), yieldOp.getOperands())) { - std::tie(opResult, yieldOperand) = it; + for (auto [opResult, yieldOperand] : + llvm::zip(op.getResults(), yieldOp.getOperands())) { if (!opResult.getUses().empty()) { newYieldOperands.push_back(yieldOperand); } diff --git a/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp b/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp index b979033..112a6517 100644 --- a/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp +++ b/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp @@ -83,10 +83,8 @@ Optional> mlir::shapeRatio(ArrayRef superShape, // Starting from the end, compute the integer divisors. std::vector result; result.reserve(superShape.size()); - int64_t superSize = 0, subSize = 0; - for (auto it : + for (auto [superSize, subSize] : llvm::zip(llvm::reverse(superShape), llvm::reverse(subShape))) { - std::tie(superSize, subSize) = it; assert(superSize > 0 && "superSize must be > 0"); assert(subSize > 0 && "subSize must be > 0"); diff --git a/mlir/lib/Support/DebugCounter.cpp b/mlir/lib/Support/DebugCounter.cpp index cf33fcc..44bcdf4 100644 --- a/mlir/lib/Support/DebugCounter.cpp +++ b/mlir/lib/Support/DebugCounter.cpp @@ -122,8 +122,7 @@ void DebugCounter::applyCLOptions() { continue; // Debug counter arguments are expected to be in the form: `counter=value`. - StringRef counterName, counterValueStr; - std::tie(counterName, counterValueStr) = arg.split('='); + auto [counterName, counterValueStr] = arg.split('='); if (counterValueStr.empty()) { llvm::errs() << "error: expected DebugCounter argument to have an `=` " "separating the counter name and value, but the provided " diff --git a/mlir/lib/TableGen/Pattern.cpp b/mlir/lib/TableGen/Pattern.cpp index d833de5..e8dc607 100644 --- a/mlir/lib/TableGen/Pattern.cpp +++ b/mlir/lib/TableGen/Pattern.cpp @@ -203,9 +203,8 @@ void DagNode::print(raw_ostream &os) const { //===----------------------------------------------------------------------===// StringRef SymbolInfoMap::getValuePackName(StringRef symbol, int *index) { - StringRef name, indexStr; int idx = -1; - std::tie(name, indexStr) = symbol.rsplit("__"); + auto [name, indexStr] = symbol.rsplit("__"); if (indexStr.consumeInteger(10, idx)) { // The second part is not an index; we return the whole symbol as-is. diff --git a/mlir/lib/Tools/PDLL/Parser/Parser.cpp b/mlir/lib/Tools/PDLL/Parser/Parser.cpp index 55b1e39..78bd9a8 100644 --- a/mlir/lib/Tools/PDLL/Parser/Parser.cpp +++ b/mlir/lib/Tools/PDLL/Parser/Parser.cpp @@ -846,9 +846,7 @@ void Parser::processTdIncludeRecords(llvm::RecordKeeper &tdRecords, bool supportsResultTypeInferrence = op.getTrait("::mlir::InferTypeOpInterface::Trait"); - bool inserted = false; - ods::Operation *odsOp = nullptr; - std::tie(odsOp, inserted) = odsContext.insertOperation( + auto [odsOp, inserted] = odsContext.insertOperation( op.getOperationName(), processDoc(op.getSummary()), processAndFormatDoc(op.getDescription()), op.getQualCppClassName(), supportsResultTypeInferrence, op.getLoc().front()); diff --git a/mlir/lib/Transforms/OpStats.cpp b/mlir/lib/Transforms/OpStats.cpp index b5d8f3e..d02cb8a 100644 --- a/mlir/lib/Transforms/OpStats.cpp +++ b/mlir/lib/Transforms/OpStats.cpp @@ -66,16 +66,15 @@ void PrintOpStatsPass::printSummary() { }; // Compute the largest dialect and operation name. - StringRef dialectName, opName; size_t maxLenOpName = 0, maxLenDialect = 0; for (const auto &key : sorted) { - std::tie(dialectName, opName) = splitOperationName(key); + auto [dialectName, opName] = splitOperationName(key); maxLenDialect = std::max(maxLenDialect, dialectName.size()); maxLenOpName = std::max(maxLenOpName, opName.size()); } for (const auto &key : sorted) { - std::tie(dialectName, opName) = splitOperationName(key); + auto [dialectName, opName] = splitOperationName(key); // Left-align the names (aligning on the dialect) and right-align the count // below. The alignment is for readability and does not affect CSV/FileCheck diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp index d82264b..f2184d2 100644 --- a/mlir/lib/Transforms/Utils/DialectConversion.cpp +++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp @@ -1407,9 +1407,7 @@ void ConversionPatternRewriterImpl::notifyOpReplaced(Operation *op, bool resultChanged = false; // Create mappings for each of the new result values. - Value newValue, result; - for (auto it : llvm::zip(newValues, op->getResults())) { - std::tie(newValue, result) = it; + for (auto [newValue, result] : llvm::zip(newValues, op->getResults())) { if (!newValue) { resultChanged = true; continue; @@ -2554,9 +2552,7 @@ replaceMaterialization(ConversionPatternRewriterImpl &rewriterImpl, // For each of the materialization results, update the inverse mappings to // point to the replacement values. - for (auto it : llvm::zip(matResults, values)) { - Value matResult, newValue; - std::tie(matResult, newValue) = it; + for (auto [matResult, newValue] : llvm::zip(matResults, values)) { auto inverseMapIt = inverseMapping.find(matResult); if (inverseMapIt == inverseMapping.end()) continue; -- 2.7.4