[Mlir-commits] [mlir] f7cd3fc - Apply clang-tidy fixes for performance-for-range-copy in VectorOps.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Thu Oct 13 14:50:25 PDT 2022
Author: Mehdi Amini
Date: 2022-10-13T21:49:19Z
New Revision: f7cd3fc35ef881bb83b9a07090979e428c557bc6
URL: https://github.com/llvm/llvm-project/commit/f7cd3fc35ef881bb83b9a07090979e428c557bc6
DIFF: https://github.com/llvm/llvm-project/commit/f7cd3fc35ef881bb83b9a07090979e428c557bc6.diff
LOG: Apply clang-tidy fixes for performance-for-range-copy in VectorOps.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/Vector/IR/VectorOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index 73506463a23d7..230c58522a022 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -328,7 +328,7 @@ struct ElideUnitDimsInMultiDimReduction
LogicalResult matchAndRewrite(MultiDimReductionOp reductionOp,
PatternRewriter &rewriter) const override {
ArrayRef<int64_t> shape = reductionOp.getSourceVectorType().getShape();
- for (auto dim : enumerate(shape)) {
+ for (const auto &dim : enumerate(shape)) {
if (reductionOp.isReducedDim(dim.index()) && dim.value() != 1)
return failure();
}
More information about the Mlir-commits
mailing list