[Mlir-commits] [mlir] 132234f - [mlir] Fix ClangTidy performance finding (NFC)

Adrian Kuegel llvmlistbot at llvm.org
Sun Jun 19 23:47:33 PDT 2022


Author: Adrian Kuegel
Date: 2022-06-20T08:47:00+02:00
New Revision: 132234fac7c54b8b23b5c9671e3001ff84d27342

URL: https://github.com/llvm/llvm-project/commit/132234fac7c54b8b23b5c9671e3001ff84d27342
DIFF: https://github.com/llvm/llvm-project/commit/132234fac7c54b8b23b5c9671e3001ff84d27342.diff

LOG: [mlir] Fix ClangTidy performance finding (NFC)

Added: 
    

Modified: 
    mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp b/mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
index c8c326d35d33c..ebc0e611f4382 100644
--- a/mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
+++ b/mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
@@ -36,7 +36,7 @@ class SliceOpConverter : public OpRewritePattern<tosa::SliceOp> {
     strides.resize(sliceOp.getType().template cast<ShapedType>().getRank(), 1);
 
     SmallVector<Value> dynSizes;
-    for (auto i : llvm::enumerate(sizes)) {
+    for (const auto &i : llvm::enumerate(sizes)) {
       int64_t size = i.value().cast<IntegerAttr>().getInt();
       size_t index = i.index();
       if (size != ShapedType::kDynamicSize)


        


More information about the Mlir-commits mailing list