[Mlir-commits] [mlir] 190cdf4 - Apply clang-tidy fixes for performance-unnecessary-value-param in AsyncToAsyncRuntime.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Mon Dec 12 23:16:40 PST 2022


Author: Mehdi Amini
Date: 2022-12-13T07:16:23Z
New Revision: 190cdf440ebf9e5be3d87daeceab7996a369fa78

URL: https://github.com/llvm/llvm-project/commit/190cdf440ebf9e5be3d87daeceab7996a369fa78
DIFF: https://github.com/llvm/llvm-project/commit/190cdf440ebf9e5be3d87daeceab7996a369fa78.diff

LOG: Apply clang-tidy fixes for performance-unnecessary-value-param in AsyncToAsyncRuntime.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
index 49fe5b5cfe110..3845cd338d05b 100644
--- a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
+++ b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
@@ -11,6 +11,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include <utility>
+
 #include "mlir/Dialect/Async/Passes.h"
 
 #include "PassDetail.h"
@@ -416,7 +418,7 @@ namespace {
 class AsyncFuncOpLowering : public OpConversionPattern<async::FuncOp> {
 public:
   AsyncFuncOpLowering(MLIRContext *ctx, FuncCoroMapPtr coros)
-      : OpConversionPattern<async::FuncOp>(ctx), coros_(coros) {}
+      : OpConversionPattern<async::FuncOp>(ctx), coros_(std::move(coros)) {}
 
   LogicalResult
   matchAndRewrite(async::FuncOp op, OpAdaptor adaptor,
@@ -474,7 +476,7 @@ class AsyncCallOpLowering : public OpConversionPattern<async::CallOp> {
 class AsyncReturnOpLowering : public OpConversionPattern<async::ReturnOp> {
 public:
   AsyncReturnOpLowering(MLIRContext *ctx, FuncCoroMapPtr coros)
-      : OpConversionPattern<async::ReturnOp>(ctx), coros_(coros) {}
+      : OpConversionPattern<async::ReturnOp>(ctx), coros_(std::move(coros)) {}
 
   LogicalResult
   matchAndRewrite(async::ReturnOp op, OpAdaptor adaptor,
@@ -525,7 +527,7 @@ class AwaitOpLoweringBase : public OpConversionPattern<AwaitType> {
 public:
   AwaitOpLoweringBase(MLIRContext *ctx, FuncCoroMapPtr coros,
                       bool should_lower_blocking_wait)
-      : OpConversionPattern<AwaitType>(ctx), coros_(coros),
+      : OpConversionPattern<AwaitType>(ctx), coros_(std::move(coros)),
         should_lower_blocking_wait_(should_lower_blocking_wait) {}
 
   LogicalResult
@@ -666,7 +668,7 @@ class AwaitAllOpLowering : public AwaitOpLoweringBase<AwaitAllOp, GroupType> {
 class YieldOpLowering : public OpConversionPattern<async::YieldOp> {
 public:
   YieldOpLowering(MLIRContext *ctx, FuncCoroMapPtr coros)
-      : OpConversionPattern<async::YieldOp>(ctx), coros_(coros) {}
+      : OpConversionPattern<async::YieldOp>(ctx), coros_(std::move(coros)) {}
 
   LogicalResult
   matchAndRewrite(async::YieldOp op, OpAdaptor adaptor,
@@ -711,7 +713,7 @@ class YieldOpLowering : public OpConversionPattern<async::YieldOp> {
 class AssertOpLowering : public OpConversionPattern<cf::AssertOp> {
 public:
   AssertOpLowering(MLIRContext *ctx, FuncCoroMapPtr coros)
-      : OpConversionPattern<cf::AssertOp>(ctx), coros_(coros) {}
+      : OpConversionPattern<cf::AssertOp>(ctx), coros_(std::move(coros)) {}
 
   LogicalResult
   matchAndRewrite(cf::AssertOp op, OpAdaptor adaptor,


        


More information about the Mlir-commits mailing list