summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp4
-rw-r--r--mlir/lib/Dialect/Traits.cpp2
-rw-r--r--mlir/lib/Dialect/VectorOps/VectorOps.cpp2
-rw-r--r--mlir/lib/IR/TypeUtilities.cpp2
-rw-r--r--mlir/lib/Parser/Parser.cpp4
-rw-r--r--mlir/lib/Target/LLVMIR/ModuleTranslation.cpp2
-rw-r--r--mlir/tools/mlir-tblgen/StructsGen.cpp2
7 files changed, 9 insertions, 9 deletions
diff --git a/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp b/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
index e500d10983c..4dd703a2f0d 100644
--- a/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
+++ b/mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
@@ -375,7 +375,7 @@ LogicalResult createLaunchFromOp(OpTy rootForOp, ArrayRef<Value> numWorkGroups,
// Replace values that are used within the region of the launchOp but are
// defined outside. They all are replaced with kernel arguments.
- for (const auto &pair :
+ for (auto pair :
llvm::zip_first(valuesToForward, launchOp.getKernelArguments())) {
Value from = std::get<0>(pair);
Value to = std::get<1>(pair);
@@ -467,7 +467,7 @@ void LoopToGpuConverter::createLaunch(OpTy rootForOp, OpTy innermostForOp,
// Remap the values defined outside the body to use kernel arguments instead.
// The list of kernel arguments also contains the lower bounds for loops at
// trailing positions, make sure we don't touch those.
- for (const auto &pair :
+ for (auto pair :
llvm::zip_first(valuesToForward, launchOp.getKernelArguments())) {
Value from = std::get<0>(pair);
Value to = std::get<1>(pair);
diff --git a/mlir/lib/Dialect/Traits.cpp b/mlir/lib/Dialect/Traits.cpp
index 3aea206c07e..744500af663 100644
--- a/mlir/lib/Dialect/Traits.cpp
+++ b/mlir/lib/Dialect/Traits.cpp
@@ -151,7 +151,7 @@ static bool areCompatibleShapes(ArrayRef<int64_t> shape1,
};
if (shape1.size() != shape2.size())
return false;
- for (const auto &p : llvm::zip(shape1, shape2))
+ for (auto p : llvm::zip(shape1, shape2))
if (!isCompatible(std::get<0>(p), std::get<1>(p)))
return false;
return true;
diff --git a/mlir/lib/Dialect/VectorOps/VectorOps.cpp b/mlir/lib/Dialect/VectorOps/VectorOps.cpp
index a3904ef97a2..4afd05758ed 100644
--- a/mlir/lib/Dialect/VectorOps/VectorOps.cpp
+++ b/mlir/lib/Dialect/VectorOps/VectorOps.cpp
@@ -1349,7 +1349,7 @@ public:
// Compute slice of vector mask region.
SmallVector<int64_t, 4> sliceMaskDimSizes;
assert(sliceOffsets.size() == maskDimSizes.size());
- for (const auto &it : llvm::zip(maskDimSizes, sliceOffsets, sliceSizes)) {
+ for (auto it : llvm::zip(maskDimSizes, sliceOffsets, sliceSizes)) {
int64_t maskDimSize = std::get<0>(it);
int64_t sliceOffset = std::get<1>(it);
int64_t sliceSize = std::get<2>(it);
diff --git a/mlir/lib/IR/TypeUtilities.cpp b/mlir/lib/IR/TypeUtilities.cpp
index 0bf1627b9d5..c4450f97759 100644
--- a/mlir/lib/IR/TypeUtilities.cpp
+++ b/mlir/lib/IR/TypeUtilities.cpp
@@ -55,7 +55,7 @@ LogicalResult mlir::verifyCompatibleShape(ArrayRef<int64_t> shape1,
ArrayRef<int64_t> shape2) {
if (shape1.size() != shape2.size())
return failure();
- for (const auto &dims : llvm::zip(shape1, shape2)) {
+ for (auto dims : llvm::zip(shape1, shape2)) {
int64_t dim1 = std::get<0>(dims);
int64_t dim2 = std::get<1>(dims);
if (!ShapedType::isDynamic(dim1) && !ShapedType::isDynamic(dim2) &&
diff --git a/mlir/lib/Parser/Parser.cpp b/mlir/lib/Parser/Parser.cpp
index 0198a45172b..942a93e5897 100644
--- a/mlir/lib/Parser/Parser.cpp
+++ b/mlir/lib/Parser/Parser.cpp
@@ -3766,7 +3766,7 @@ Operation *OperationParser::parseGenericOperation() {
}
// Add the successors, and their operands after the proper operands.
- for (const auto &succ : llvm::zip(successors, successorOperands)) {
+ for (auto succ : llvm::zip(successors, successorOperands)) {
Block *successor = std::get<0>(succ);
const SmallVector<Value, 4> &operands = std::get<1>(succ);
result.addSuccessor(successor, operands);
@@ -4176,7 +4176,7 @@ public:
SmallVector<std::pair<OperationParser::SSAUseInfo, Type>, 2>
regionArguments;
- for (const auto &pair : llvm::zip(arguments, argTypes)) {
+ for (auto pair : llvm::zip(arguments, argTypes)) {
const OperandType &operand = std::get<0>(pair);
Type type = std::get<1>(pair);
OperationParser::SSAUseInfo operandInfo = {operand.name, operand.number,
diff --git a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
index e3c0768ef33..65081f45d02 100644
--- a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
@@ -409,7 +409,7 @@ LogicalResult ModuleTranslation::convertOneFunction(LLVMFuncOp func) {
// Add function arguments to the value remapping table.
// If there was noalias info then we decorate each argument accordingly.
unsigned int argIdx = 0;
- for (const auto &kvp : llvm::zip(func.getArguments(), llvmFunc->args())) {
+ for (auto kvp : llvm::zip(func.getArguments(), llvmFunc->args())) {
llvm::Argument &llvmArg = std::get<1>(kvp);
BlockArgument mlirArg = std::get<0>(kvp);
diff --git a/mlir/tools/mlir-tblgen/StructsGen.cpp b/mlir/tools/mlir-tblgen/StructsGen.cpp
index 576085e41eb..7b91f9e987d 100644
--- a/mlir/tools/mlir-tblgen/StructsGen.cpp
+++ b/mlir/tools/mlir-tblgen/StructsGen.cpp
@@ -63,7 +63,7 @@ public:
// namespace::storage TblgenStruct::field1() const;
const char *fieldInfo = R"( {0} {1}() const;
)";
- for (const auto field : fields) {
+ for (auto field : fields) {
auto name = field.getName();
auto type = field.getType();
auto storage = type.getStorageType();
OpenPOWER on IntegriCloud