Apply clang-tidy fixes for performance-unnecessary-value-param in TileUsingInterface...
authorMehdi Amini <joker.eph@gmail.com>
Thu, 6 Oct 2022 19:19:41 +0000 (19:19 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Wed, 12 Oct 2022 05:03:45 +0000 (05:03 +0000)
mlir/include/mlir/Dialect/SCF/Transforms/TileUsingInterface.h
mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp

index 174b39c..6cdef25 100644 (file)
@@ -75,7 +75,7 @@ struct SCFTilingResult {
 /// `scf.for` for iterating over the tiles.
 FailureOr<SCFTilingResult> tileUsingSCFForOp(RewriterBase &rewriter,
                                              TilingInterface op,
-                                             SCFTilingOptions options);
+                                             const SCFTilingOptions &options);
 
 /// Options used to control tile + fuse.
 struct SCFTileAndFuseOptions {
@@ -127,9 +127,9 @@ struct SCFTileAndFuseResult {
 /// }
 /// ```
 FailureOr<SCFTileAndFuseResult>
-tileConsumerAndFuseProducerGreedilyUsingSCFForOp(RewriterBase &rewriter,
-                                                 TilingInterface consumer,
-                                                 SCFTileAndFuseOptions options);
+tileConsumerAndFuseProducerGreedilyUsingSCFForOp(
+    RewriterBase &rewriter, TilingInterface consumer,
+    const SCFTileAndFuseOptions &options);
 
 /// Method to lower an `op` that implements the `TilingInterface` to
 /// loops/scalars.
index 2003b5e..04704c8 100644 (file)
@@ -265,7 +265,7 @@ updateDestinationOperandsForTiledOp(OpBuilder &builder,
 /// `TilingInterface` using `scf.for` to iterate over the tiles.
 FailureOr<scf::SCFTilingResult>
 mlir::scf::tileUsingSCFForOp(RewriterBase &rewriter, TilingInterface op,
-                             scf::SCFTilingOptions options) {
+                             const scf::SCFTilingOptions &options) {
   OpBuilder::InsertionGuard guard(rewriter);
   rewriter.setInsertionPointAfter(op);
 
@@ -433,7 +433,7 @@ getUntiledProducerFromSliceSource(OpOperand *source,
 FailureOr<scf::SCFTileAndFuseResult>
 mlir::scf::tileConsumerAndFuseProducerGreedilyUsingSCFForOp(
     RewriterBase &rewriter, TilingInterface consumer,
-    scf::SCFTileAndFuseOptions options) {
+    const scf::SCFTileAndFuseOptions &options) {
   // This transformation is only valid for ops that return values (i.e. not
   // valid to use with operations that have memref operands).
   if (!consumer->getNumResults()) {