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

Mehdi Amini llvmlistbot at llvm.org
Tue Jun 28 10:31:08 PDT 2022


Author: Mehdi Amini
Date: 2022-06-28T17:30:46Z
New Revision: eafb18eb87ccf960750e99b111b5171f8a97701f

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

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

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Linalg/Passes.h
    mlir/lib/Dialect/Linalg/Transforms/LinalgStrategyPasses.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Linalg/Passes.h b/mlir/include/mlir/Dialect/Linalg/Passes.h
index 6e10f373534e8..99f63de5edb5c 100644
--- a/mlir/include/mlir/Dialect/Linalg/Passes.h
+++ b/mlir/include/mlir/Dialect/Linalg/Passes.h
@@ -130,7 +130,7 @@ createLinalgStrategyInterchangePass(
 /// Create a LinalgStrategyPeelPass.
 std::unique_ptr<OperationPass<func::FuncOp>> createLinalgStrategyPeelPass(
     StringRef opName = "",
-    linalg::LinalgPeelOptions opt = linalg::LinalgPeelOptions(),
+    const linalg::LinalgPeelOptions &opt = linalg::LinalgPeelOptions(),
     const linalg::LinalgTransformationFilter &filter =
         linalg::LinalgTransformationFilter());
 

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/LinalgStrategyPasses.cpp b/mlir/lib/Dialect/Linalg/Transforms/LinalgStrategyPasses.cpp
index 5bac7980f74ef..f5a2a068fd0c9 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/LinalgStrategyPasses.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/LinalgStrategyPasses.cpp
@@ -270,7 +270,7 @@ struct LinalgStrategyPeelPass
 
   LinalgStrategyPeelPass(StringRef opName, LinalgPeelOptions opt,
                          LinalgTransformationFilter filt)
-      : options(opt), filter(std::move(filt)) {
+      : options(std::move(opt)), filter(std::move(filt)) {
     this->anchorOpName.setValue(opName.str());
   }
 
@@ -542,7 +542,8 @@ mlir::createLinalgStrategyInterchangePass(
 
 /// Create a LinalgStrategyPeelPass.
 std::unique_ptr<OperationPass<func::FuncOp>>
-mlir::createLinalgStrategyPeelPass(StringRef opName, LinalgPeelOptions opt,
+mlir::createLinalgStrategyPeelPass(StringRef opName,
+                                   const LinalgPeelOptions &opt,
                                    const LinalgTransformationFilter &filter) {
   return std::make_unique<LinalgStrategyPeelPass>(opName, opt, filter);
 }


        


More information about the Mlir-commits mailing list