[Mlir-commits] [mlir] 70423ee - [mlir][MemRef] Apply ClangTidy performance fix (NFC).

Adrian Kuegel llvmlistbot at llvm.org
Sun Jan 1 23:42:07 PST 2023


Author: Adrian Kuegel
Date: 2023-01-02T08:41:31+01:00
New Revision: 70423eedecea4015c1c0f2ca7df700d9063205ca

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

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

Added: 
    

Modified: 
    mlir/lib/Dialect/MemRef/Transforms/RuntimeOpVerification.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/MemRef/Transforms/RuntimeOpVerification.cpp b/mlir/lib/Dialect/MemRef/Transforms/RuntimeOpVerification.cpp
index 101325ee85913..002e5f1deb950 100644
--- a/mlir/lib/Dialect/MemRef/Transforms/RuntimeOpVerification.cpp
+++ b/mlir/lib/Dialect/MemRef/Transforms/RuntimeOpVerification.cpp
@@ -26,7 +26,8 @@ struct ExpandShapeOpInterface
 
     // Verify that the expanded dim sizes are a product of the collapsed dim
     // size.
-    for (auto it : llvm::enumerate(expandShapeOp.getReassociationIndices())) {
+    for (const auto &it :
+         llvm::enumerate(expandShapeOp.getReassociationIndices())) {
       Value srcDimSz =
           builder.create<DimOp>(loc, expandShapeOp.getSrc(), it.index());
       int64_t groupSz = 1;


        


More information about the Mlir-commits mailing list