[mlir][MemRef] Apply ClangTidy performance fix (NFC).
authorAdrian Kuegel <akuegel@google.com>
Mon, 2 Jan 2023 07:41:31 +0000 (08:41 +0100)
committerAdrian Kuegel <akuegel@google.com>
Mon, 2 Jan 2023 07:41:31 +0000 (08:41 +0100)
mlir/lib/Dialect/MemRef/Transforms/RuntimeOpVerification.cpp

index 101325e..002e5f1 100644 (file)
@@ -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;