Apply clang-tidy fixes for performance-unnecessary-value-param in Utils.cpp (NFC)
authorMehdi Amini <joker.eph@gmail.com>
Mon, 29 Aug 2022 11:09:54 +0000 (11:09 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Wed, 7 Sep 2022 19:30:54 +0000 (19:30 +0000)
mlir/include/mlir/Dialect/SCF/Utils/Utils.h
mlir/lib/Dialect/SCF/Utils/Utils.cpp

index 478dd4f..63b94a1 100644 (file)
@@ -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
index 24b92d6..e40fc9c 100644 (file)
@@ -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());