[Mlir-commits] [mlir] da47c7c - Apply clang-tidy fixes for performance-unnecessary-value-param in Utils.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Wed Sep 7 12:31:20 PDT 2022
Author: Mehdi Amini
Date: 2022-09-07T19:30:54Z
New Revision: da47c7ccb90d49ef4864304492a5866f361d556c
URL: https://github.com/llvm/llvm-project/commit/da47c7ccb90d49ef4864304492a5866f361d556c
DIFF: https://github.com/llvm/llvm-project/commit/da47c7ccb90d49ef4864304492a5866f361d556c.diff
LOG: Apply clang-tidy fixes for performance-unnecessary-value-param in Utils.cpp (NFC)
Added:
Modified:
mlir/include/mlir/Dialect/SCF/Utils/Utils.h
mlir/lib/Dialect/SCF/Utils/Utils.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/SCF/Utils/Utils.h b/mlir/include/mlir/Dialect/SCF/Utils/Utils.h
index 478dd4fdc5157..63b94a1bae72c 100644
--- a/mlir/include/mlir/Dialect/SCF/Utils/Utils.h
+++ b/mlir/include/mlir/Dialect/SCF/Utils/Utils.h
@@ -69,7 +69,7 @@ scf::ForOp replaceLoopWithNewYields(OpBuilder &builder, scf::ForOp loop,
SmallVector<scf::ForOp>
replaceLoopNestWithNewYields(OpBuilder &builder, ArrayRef<scf::ForOp> loopNest,
ValueRange newIterOperands,
- NewYieldValueFn newYieldValueFn);
+ const NewYieldValueFn &newYieldValueFn);
/// Outline a region with a single block into a new FuncOp.
/// Assumes the FuncOp result types is the type of the yielded operands of the
diff --git a/mlir/lib/Dialect/SCF/Utils/Utils.cpp b/mlir/lib/Dialect/SCF/Utils/Utils.cpp
index 24b92d698bd59..e40fc9cade586 100644
--- a/mlir/lib/Dialect/SCF/Utils/Utils.cpp
+++ b/mlir/lib/Dialect/SCF/Utils/Utils.cpp
@@ -104,7 +104,7 @@ mlir::replaceLoopWithNewYields(OpBuilder &builder, scf::ForOp loop,
SmallVector<scf::ForOp> mlir::replaceLoopNestWithNewYields(
OpBuilder &builder, ArrayRef<scf::ForOp> loopNest,
- ValueRange newIterOperands, NewYieldValueFn newYieldValueFn) {
+ ValueRange newIterOperands, const NewYieldValueFn &newYieldValueFn) {
if (loopNest.empty())
return {};
SmallVector<scf::ForOp> newLoopNest(loopNest.size());
More information about the Mlir-commits
mailing list