[Mlir-commits] [mlir] 722a3a5 - Apply clang-tidy fixes for performance-for-range-copy in MemRefOps.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Tue Apr 19 00:23:29 PDT 2022


Author: Mehdi Amini
Date: 2022-04-19T07:23:12Z
New Revision: 722a3a58e277b7f5103e95b6cfe116ef8d2f121b

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

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

Added: 
    

Modified: 
    mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
index 9e1010d4896de..9a2ebc586daf4 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
@@ -1833,7 +1833,7 @@ computeCollapsedLayoutMap(MemRefType srcType,
 
   // Validate that each reassociation group is contiguous.
   unsigned resultStrideIndex = resultStrides.size() - 1;
-  for (ReassociationIndices reassoc : llvm::reverse(reassociation)) {
+  for (const ReassociationIndices &reassoc : llvm::reverse(reassociation)) {
     auto trailingReassocs = ArrayRef<int64_t>(reassoc).drop_front();
     using saturated_arith::Wrapper;
     auto stride = Wrapper::stride(resultStrides[resultStrideIndex--]);


        


More information about the Mlir-commits mailing list