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

Mehdi Amini llvmlistbot at llvm.org
Sun Jan 9 17:05:40 PST 2022


Author: Mehdi Amini
Date: 2022-01-10T01:05:14Z
New Revision: ba19fa5779f309db9f39629e35c1674589e75419

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

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp b/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp
index 8f7c331597bce..ce636f3d84d32 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp
@@ -610,7 +610,8 @@ LogicalResult isGenericOpExpandable(GenericOp genericOp,
                                     PatternRewriter &rewriter) {
   // Current reshape only supports expansion of a dynamic dim when only one of
   // the expanded dims are dynamic.
-  for (auto originalShape : llvm::enumerate(expansionInfo.getOriginalShape()))
+  for (const auto &originalShape :
+       llvm::enumerate(expansionInfo.getOriginalShape()))
     if (ShapedType::isDynamic(originalShape.value())) {
       // All but one of the expanded dims must be static.
       bool foundDynamicExpandedDim = false;


        


More information about the Mlir-commits mailing list