diff --git a/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp b/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp --- a/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp +++ b/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp @@ -426,9 +426,7 @@ for (auto config : llvm::zip( mapping, parallelOp.getInductionVars(), parallelOp.getLowerBound(), parallelOp.getUpperBound(), parallelOp.getStep())) { - Attribute mappingAttribute; - Value iv, lowerBound, upperBound, step; - std::tie(mappingAttribute, iv, lowerBound, upperBound, step) = config; + auto [mappingAttribute, iv, lowerBound, upperBound, step] = config; auto annotation = mappingAttribute.dyn_cast(); if (!annotation) diff --git a/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp b/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp --- a/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp +++ b/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp @@ -58,8 +58,7 @@ StringRef spec) { auto i32 = IntegerType::get(&ctx, 32); - StringRef abiString, preferredString; - std::tie(abiString, preferredString) = spec.split(':'); + auto [abiString, preferredString] = spec.split(':'); int abi, preferred; if (abiString.getAsInteger(/*Radix=*/10, abi)) return nullptr; @@ -119,8 +118,7 @@ std::tie(current, layout) = split; // Split at ':'. - StringRef kind, spec; - std::tie(kind, spec) = current.split(':'); + auto [kind, spec] = current.split(':'); if (seen.contains(kind)) continue; seen.insert(kind); diff --git a/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp b/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp --- a/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp +++ b/mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp @@ -694,8 +694,7 @@ {1} }]; )FMT"; - StringRef summary, description; - std::tie(summary, description) = + auto [summary, description] = StringRef(*opConfig.metadata->doc).trim().split('\n'); doc = llvm::formatv(structuredOpDocFmt, summary.trim(), description.trim()); }