From: Mehdi Amini Date: Thu, 6 Oct 2022 19:19:41 +0000 (+0000) Subject: Apply clang-tidy fixes for performance-unnecessary-value-param in TileUsingInterface... X-Git-Tag: upstream/17.0.6~30893 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d4baa7442ccf7b87130b8b783164b8d9d1db005;p=platform%2Fupstream%2Fllvm.git Apply clang-tidy fixes for performance-unnecessary-value-param in TileUsingInterface.cpp (NFC) --- diff --git a/mlir/include/mlir/Dialect/SCF/Transforms/TileUsingInterface.h b/mlir/include/mlir/Dialect/SCF/Transforms/TileUsingInterface.h index 174b39c..6cdef25 100644 --- a/mlir/include/mlir/Dialect/SCF/Transforms/TileUsingInterface.h +++ b/mlir/include/mlir/Dialect/SCF/Transforms/TileUsingInterface.h @@ -75,7 +75,7 @@ struct SCFTilingResult { /// `scf.for` for iterating over the tiles. FailureOr 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 -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. diff --git a/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp b/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp index 2003b5e..04704c8 100644 --- a/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp +++ b/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp @@ -265,7 +265,7 @@ updateDestinationOperandsForTiledOp(OpBuilder &builder, /// `TilingInterface` using `scf.for` to iterate over the tiles. FailureOr 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 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()) {