[Mlir-commits] [mlir] 3b6943e - Apply clang-tidy fixes for performance-for-range-copy in PadOpInterchange.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Fri Jan 14 10:08:57 PST 2022


Author: Mehdi Amini
Date: 2022-01-14T18:08:42Z
New Revision: 3b6943e66cf150b074044274b079c7286283974e

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

LOG: Apply clang-tidy fixes for performance-for-range-copy in PadOpInterchange.cpp (NFC)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/Transforms/PadOpInterchange.cpp b/mlir/lib/Dialect/Linalg/Transforms/PadOpInterchange.cpp
index 65bc8bc061b2d..64de5197266be 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/PadOpInterchange.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/PadOpInterchange.cpp
@@ -89,7 +89,7 @@ struct FusePadTensorOp : OpRewritePattern<PadTensorOp> {
     SmallVector<OpFoldResult> offsets = padOp.getMixedLowPad();
     SmallVector<OpFoldResult> sizes;
     sizes.reserve(offsets.size());
-    for (auto shape : llvm::enumerate(
+    for (const auto &shape : llvm::enumerate(
              source.getType().cast<RankedTensorType>().getShape())) {
       if (ShapedType::isDynamic(shape.value())) {
         sizes.push_back(


        


More information about the Mlir-commits mailing list