diff options
author | Michele Scuttari <michele.scuttari@outlook.com> | 2022-08-30 21:56:31 +0200 |
---|---|---|
committer | Michele Scuttari <michele.scuttari@outlook.com> | 2022-08-30 21:56:31 +0200 |
commit | 2be8af8f0e0780901213b6fd3013a5268ddc3359 (patch) | |
tree | b92b5c6894a41f1b24c858d1d9cf18f9d12574ec /mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp | |
parent | 999886325e825747d5aff5c447b20d12fec7b57a (diff) | |
download | llvm-2be8af8f0e0780901213b6fd3013a5268ddc3359.zip llvm-2be8af8f0e0780901213b6fd3013a5268ddc3359.tar.gz llvm-2be8af8f0e0780901213b6fd3013a5268ddc3359.tar.bz2 |
[MLIR] Update pass declarations to new autogenerated files
The patch introduces the required changes to update the pass declarations and definitions to use the new autogenerated files and allow dropping the old infrastructure.
Reviewed By: mehdi_amini, rriddle
Differential Review: https://reviews.llvm.org/D132838
Diffstat (limited to 'mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp')
-rw-r--r-- | mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp b/mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp index df6df15..e579f27 100644 --- a/mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp +++ b/mlir/lib/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.cpp @@ -7,12 +7,18 @@ //===----------------------------------------------------------------------===// #include "mlir/Conversion/ArithmeticToLLVM/ArithmeticToLLVM.h" -#include "../PassDetail.h" + #include "mlir/Conversion/LLVMCommon/ConversionTarget.h" #include "mlir/Conversion/LLVMCommon/VectorPattern.h" #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h" #include "mlir/Dialect/LLVMIR/LLVMDialect.h" #include "mlir/IR/TypeUtilities.h" +#include "mlir/Pass/Pass.h" + +namespace mlir { +#define GEN_PASS_DEF_CONVERTARITHMETICTOLLVMPASS +#include "mlir/Conversion/Passes.h.inc" +} // namespace mlir using namespace mlir; @@ -315,8 +321,9 @@ CmpFOpLowering::matchAndRewrite(arith::CmpFOp op, OpAdaptor adaptor, namespace { struct ConvertArithmeticToLLVMPass - : public ConvertArithmeticToLLVMBase<ConvertArithmeticToLLVMPass> { - ConvertArithmeticToLLVMPass() = default; + : public impl::ConvertArithmeticToLLVMPassBase< + ConvertArithmeticToLLVMPass> { + using ConvertArithmeticToLLVMPassBase::ConvertArithmeticToLLVMPassBase; void runOnOperation() override { LLVMConversionTarget target(getContext()); @@ -389,7 +396,3 @@ void mlir::arith::populateArithmeticToLLVMConversionPatterns( >(converter); // clang-format on } - -std::unique_ptr<Pass> mlir::arith::createConvertArithmeticToLLVMPass() { - return std::make_unique<ConvertArithmeticToLLVMPass>(); -} |