From b8b5165f67687ae32f9e0a55ded751d4a42ff309 Mon Sep 17 00:00:00 2001 From: Adrian Kuegel Date: Tue, 4 Oct 2022 14:07:39 +0200 Subject: [PATCH] [mlir] Apply ClangTidy performance finding. loop variable is copied but only used as const reference. --- mlir/test/lib/Interfaces/TilingInterface/TestTilingInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/test/lib/Interfaces/TilingInterface/TestTilingInterface.cpp b/mlir/test/lib/Interfaces/TilingInterface/TestTilingInterface.cpp index edb7ba3..977a054 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 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()); } -- 2.7.4