[Mlir-commits] [mlir] b8b5165 - [mlir] Apply ClangTidy performance finding.
Adrian Kuegel
llvmlistbot at llvm.org
Tue Oct 4 05:08:19 PDT 2022
Author: Adrian Kuegel
Date: 2022-10-04T14:07:39+02:00
New Revision: b8b5165f67687ae32f9e0a55ded751d4a42ff309
URL: https://github.com/llvm/llvm-project/commit/b8b5165f67687ae32f9e0a55ded751d4a42ff309
DIFF: https://github.com/llvm/llvm-project/commit/b8b5165f67687ae32f9e0a55ded751d4a42ff309.diff
LOG: [mlir] Apply ClangTidy performance finding.
loop variable is copied but only used as const reference.
Added:
Modified:
mlir/test/lib/Interfaces/TilingInterface/TestTilingInterface.cpp
Removed:
################################################################################
diff --git a/mlir/test/lib/Interfaces/TilingInterface/TestTilingInterface.cpp b/mlir/test/lib/Interfaces/TilingInterface/TestTilingInterface.cpp
index edb7ba3729173..977a0541ec083 100644
--- a/mlir/test/lib/Interfaces/TilingInterface/TestTilingInterface.cpp
+++ b/mlir/test/lib/Interfaces/TilingInterface/TestTilingInterface.cpp
@@ -116,7 +116,7 @@ struct TestTileConsumerAndFuseProducersGreedilyUsingSCFForOp
}
// Replace the tiled op with replacements.
SmallVector<Value> replacements(op->getNumResults());
- for (auto result : llvm::enumerate(op->getResults())) {
+ for (const auto &result : llvm::enumerate(op->getResults())) {
replacements[result.index()] =
tileAndFuseResult->replacements.lookup(result.value());
}
More information about the Mlir-commits
mailing list