[Mlir-commits] [mlir] e0568fa - [mlir] Apply ClangTidy performance finding (NFC).

Adrian Kuegel llvmlistbot at llvm.org
Mon Aug 29 00:16:14 PDT 2022


Author: Adrian Kuegel
Date: 2022-08-29T09:15:35+02:00
New Revision: e0568fa763516747914207a68c0266e2101e57e2

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

LOG: [mlir] Apply ClangTidy performance finding (NFC).

Added: 
    

Modified: 
    mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
index e5040a45f0422..55ce5ea66ae3c 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
@@ -452,7 +452,7 @@ tileLinalgOpImpl(RewriterBase &b, LinalgOp op, ArrayRef<OpFoldResult> tileSizes,
         linalg::ProcInfo{nullptr, nullptr, linalg::DistributionMethod::None});
     // Collect loop ranges of tiled loopss, loops that are parallel.
     SmallVector<Range> parallelLoopRanges;
-    for (auto iteratorType : llvm::enumerate(iteratorTypes)) {
+    for (const auto &iteratorType : llvm::enumerate(iteratorTypes)) {
       if (!isParallelIterator(iteratorType.value()))
         break;
       parallelLoopRanges.push_back(loopRanges[iteratorType.index()]);
@@ -461,7 +461,7 @@ tileLinalgOpImpl(RewriterBase &b, LinalgOp op, ArrayRef<OpFoldResult> tileSizes,
         options.distribution->procInfo(b, op.getLoc(), parallelLoopRanges);
     unsigned procIdIdx = 0;
     // Update the distribution information for the loops.
-    for (auto iteratorType : llvm::enumerate(iteratorTypes)) {
+    for (const auto &iteratorType : llvm::enumerate(iteratorTypes)) {
       if (!isParallelIterator(iteratorType.value()))
         break;
       procInfo[iteratorType.index()] = returnedProcInfo[procIdIdx++];


        


More information about the Mlir-commits mailing list