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

Adrian Kuegel llvmlistbot at llvm.org
Mon Mar 20 02:14:33 PDT 2023


Author: Adrian Kuegel
Date: 2023-03-20T10:14:02+01:00
New Revision: 499e1a54f5bf58dafc327183b02592eea9c99d1d

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

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp b/mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
index e001f59b21e93..f44c99b64589f 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
@@ -541,7 +541,7 @@ FailureOr<PackResult> linalg::pack(RewriterBase &rewriter,
 
   // Step 2. Propagate packing to all LinalgOp operands.
   SmallVector<Value> inputsAndInits, results;
-  for (auto operandsList :
+  for (const auto& operandsList :
        {linalgOp.getDpsInputOperands(), linalgOp.getDpsInitOperands()}) {
     for (OpOperand *opOperandPtr : operandsList) {
       int64_t pos = opOperandPtr->getOperandNumber();


        


More information about the Mlir-commits mailing list