Skip to content

Commit 63d69a2

Browse files
committed
Apply clang-tidy fixes for performance-unnecessary-value-param in Utils.cpp (NFC)
1 parent 4f89ff3 commit 63d69a2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

mlir/include/mlir/Dialect/SCF/Utils/Utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ using NewYieldValueFn = std::function<SmallVector<Value>(
5454
OpBuilder &b, Location loc, ArrayRef<BlockArgument> newBBArgs)>;
5555
scf::ForOp replaceLoopWithNewYields(OpBuilder &builder, scf::ForOp loop,
5656
ValueRange newIterOperands,
57-
NewYieldValueFn newYieldValuesFn);
57+
const NewYieldValueFn &newYieldValuesFn);
5858

5959
/// Outline a region with a single block into a new FuncOp.
6060
/// Assumes the FuncOp result types is the type of the yielded operands of the

mlir/lib/Dialect/SCF/Utils/Utils.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ struct LoopParams {
3636
};
3737
} // namespace
3838

39-
scf::ForOp mlir::replaceLoopWithNewYields(OpBuilder &builder, scf::ForOp loop,
40-
ValueRange newIterOperands,
41-
NewYieldValueFn newYieldValuesFn) {
39+
scf::ForOp
40+
mlir::replaceLoopWithNewYields(OpBuilder &builder, scf::ForOp loop,
41+
ValueRange newIterOperands,
42+
const NewYieldValueFn &newYieldValuesFn) {
4243
// Create a new loop before the existing one, with the extra operands.
4344
OpBuilder::InsertionGuard g(builder);
4445
builder.setInsertionPoint(loop);

0 commit comments

Comments
 (0)