#ifdef GEN_PASS_DECL
#define GEN_PASS_DECL_ARITHTOAMDGPUCONVERSIONPASS
#define GEN_PASS_DECL_ARITHTOARMSMECONVERSIONPASS
#define GEN_PASS_DECL_ARITHTOLLVMCONVERSIONPASS
#define GEN_PASS_DECL_CONVERTAMDGPUTOROCDL
#define GEN_PASS_DECL_CONVERTAFFINEFORTOGPU
#define GEN_PASS_DECL_CONVERTAFFINETOSTANDARD
#define GEN_PASS_DECL_CONVERTARITHTOEMITC
#define GEN_PASS_DECL_CONVERTARITHTOSPIRV
#define GEN_PASS_DECL_CONVERTARMNEON2DTOINTR
#define GEN_PASS_DECL_CONVERTARMSMETOLLVM
#define GEN_PASS_DECL_CONVERTARMSMETOSCF
#define GEN_PASS_DECL_CONVERTASYNCTOLLVMPASS
#define GEN_PASS_DECL_CONVERTBUFFERIZATIONTOMEMREF
#define GEN_PASS_DECL_CONVERTCOMPLEXTOLLVMPASS
#define GEN_PASS_DECL_CONVERTCOMPLEXTOLIBM
#define GEN_PASS_DECL_CONVERTCOMPLEXTOSPIRVPASS
#define GEN_PASS_DECL_CONVERTCOMPLEXTOSTANDARD
#define GEN_PASS_DECL_CONVERTCONTROLFLOWTOLLVMPASS
#define GEN_PASS_DECL_CONVERTCONTROLFLOWTOSPIRV
#define GEN_PASS_DECL_CONVERTFUNCTOEMITC
#define GEN_PASS_DECL_CONVERTFUNCTOLLVMPASS
#define GEN_PASS_DECL_CONVERTFUNCTOSPIRV
#define GEN_PASS_DECL_CONVERTGPUTOSPIRV
#define GEN_PASS_DECL_CONVERTGPULAUNCHFUNCTOVULKANLAUNCHFUNC
#define GEN_PASS_DECL_CONVERTGPUOPSTOLLVMSPVOPS
#define GEN_PASS_DECL_CONVERTGPUOPSTONVVMOPS
#define GEN_PASS_DECL_CONVERTGPUOPSTOROCDLOPS
#define GEN_PASS_DECL_CONVERTINDEXTOLLVMPASS
#define GEN_PASS_DECL_CONVERTINDEXTOSPIRVPASS
#define GEN_PASS_DECL_CONVERTLINALGTOSTANDARD
#define GEN_PASS_DECL_CONVERTMATHTOFUNCS
#define GEN_PASS_DECL_CONVERTMATHTOLLVMPASS
#define GEN_PASS_DECL_CONVERTMATHTOLIBM
#define GEN_PASS_DECL_CONVERTMATHTOROCDL
#define GEN_PASS_DECL_CONVERTMATHTOSPIRV
#define GEN_PASS_DECL_CONVERTMEMREFTOEMITC
#define GEN_PASS_DECL_CONVERTMEMREFTOSPIRV
#define GEN_PASS_DECL_CONVERTNVGPUTONVVMPASS
#define GEN_PASS_DECL_CONVERTNVVMTOLLVMPASS
#define GEN_PASS_DECL_CONVERTOPENACCTOSCF
#define GEN_PASS_DECL_CONVERTOPENMPTOLLVMPASS
#define GEN_PASS_DECL_CONVERTPDLTOPDLINTERP
#define GEN_PASS_DECL_CONVERTPARALLELLOOPTOGPU
#define GEN_PASS_DECL_CONVERTSCFTOOPENMPPASS
#define GEN_PASS_DECL_CONVERTSPIRVTOLLVMPASS
#define GEN_PASS_DECL_CONVERTSHAPECONSTRAINTS
#define GEN_PASS_DECL_CONVERTSHAPETOSTANDARD
#define GEN_PASS_DECL_CONVERTTENSORTOLINALG
#define GEN_PASS_DECL_CONVERTTENSORTOSPIRV
#define GEN_PASS_DECL_CONVERTTOLLVMPASS
#define GEN_PASS_DECL_CONVERTTOSPIRVPASS
#define GEN_PASS_DECL_CONVERTVECTORTOARMSME
#define GEN_PASS_DECL_CONVERTVECTORTOGPU
#define GEN_PASS_DECL_CONVERTVECTORTOLLVMPASS
#define GEN_PASS_DECL_CONVERTVECTORTOSCF
#define GEN_PASS_DECL_CONVERTVECTORTOSPIRV
#define GEN_PASS_DECL_CONVERTVECTORTOXEGPU
#define GEN_PASS_DECL_CONVERTVULKANLAUNCHFUNCTOVULKANCALLSPASS
#define GEN_PASS_DECL_FINALIZEMEMREFTOLLVMCONVERSIONPASS
#define GEN_PASS_DECL_GPUTOLLVMCONVERSIONPASS
#define GEN_PASS_DECL_LIFTCONTROLFLOWTOSCFPASS
#define GEN_PASS_DECL_LOWERHOSTCODETOLLVMPASS
#define GEN_PASS_DECL_MAPMEMREFSTORAGECLASS
#define GEN_PASS_DECL_RECONCILEUNREALIZEDCASTS
#define GEN_PASS_DECL_SCFTOCONTROLFLOW
#define GEN_PASS_DECL_SCFTOEMITC
#define GEN_PASS_DECL_SCFTOSPIRV
#define GEN_PASS_DECL_SETLLVMMODULEDATALAYOUTPASS
#define GEN_PASS_DECL_TOSATOARITH
#define GEN_PASS_DECL_TOSATOLINALG
#define GEN_PASS_DECL_TOSATOLINALGNAMED
#define GEN_PASS_DECL_TOSATOMLPROGRAM
#define GEN_PASS_DECL_TOSATOSCF
#define GEN_PASS_DECL_TOSATOTENSOR
#define GEN_PASS_DECL_UBTOLLVMCONVERSIONPASS
#define GEN_PASS_DECL_UBTOSPIRVCONVERSIONPASS
#undef GEN_PASS_DECL
#endif
#ifdef GEN_PASS_DECL_ARITHTOAMDGPUCONVERSIONPASS
struct ArithToAMDGPUConversionPassOptions {
std::string chipset = "gfx000";
bool saturateFP8Truncf = false;
bool allowPackedF16Rtz = false;
};
std::unique_ptr<::mlir::Pass> createArithToAMDGPUConversionPass();
std::unique_ptr<::mlir::Pass> createArithToAMDGPUConversionPass(ArithToAMDGPUConversionPassOptions options);
#undef GEN_PASS_DECL_ARITHTOAMDGPUCONVERSIONPASS
#endif
#ifdef GEN_PASS_DEF_ARITHTOAMDGPUCONVERSIONPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createArithToAMDGPUConversionPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createArithToAMDGPUConversionPass(ArithToAMDGPUConversionPassOptions options);
}
namespace impl {
template <typename DerivedT>
class ArithToAMDGPUConversionPassBase : public ::mlir::OperationPass<> {
public:
using Base = ArithToAMDGPUConversionPassBase;
ArithToAMDGPUConversionPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ArithToAMDGPUConversionPassBase(const ArithToAMDGPUConversionPassBase &other) : ::mlir::OperationPass<>(other) {}
ArithToAMDGPUConversionPassBase& operator=(const ArithToAMDGPUConversionPassBase &) = delete;
ArithToAMDGPUConversionPassBase(ArithToAMDGPUConversionPassBase &&) = delete;
ArithToAMDGPUConversionPassBase& operator=(ArithToAMDGPUConversionPassBase &&) = delete;
~ArithToAMDGPUConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arith-to-amdgpu");
}
::llvm::StringRef getArgument() const override { return "convert-arith-to-amdgpu"; }
::llvm::StringRef getDescription() const override { return "Convert Arith operations to AMDGPU-specific implementations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ArithToAMDGPUConversionPass");
}
::llvm::StringRef getName() const override { return "ArithToAMDGPUConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<amdgpu::AMDGPUDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ArithToAMDGPUConversionPassBase<DerivedT>)
ArithToAMDGPUConversionPassBase(ArithToAMDGPUConversionPassOptions options) : ArithToAMDGPUConversionPassBase() {
chipset = std::move(options.chipset);
saturateFP8Truncf = std::move(options.saturateFP8Truncf);
allowPackedF16Rtz = std::move(options.allowPackedF16Rtz);
}
protected:
::mlir::Pass::Option<std::string> chipset{*this, "chipset", ::llvm::cl::desc("Chipset that these operations will run on"), ::llvm::cl::init("gfx000")};
::mlir::Pass::Option<bool> saturateFP8Truncf{*this, "saturate-fp8-truncf", ::llvm::cl::desc("Use saturating truncation for 8-bit float types"), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> allowPackedF16Rtz{*this, "allow-packed-f16-round-to-zero", ::llvm::cl::desc("Whether we should allow f32->f16 packed round-to-zero conversion"), ::llvm::cl::init(false)};
private:
friend std::unique_ptr<::mlir::Pass> createArithToAMDGPUConversionPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createArithToAMDGPUConversionPass(ArithToAMDGPUConversionPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createArithToAMDGPUConversionPass() {
return impl::createArithToAMDGPUConversionPass();
}
std::unique_ptr<::mlir::Pass> createArithToAMDGPUConversionPass(ArithToAMDGPUConversionPassOptions options) {
return impl::createArithToAMDGPUConversionPass(std::move(options));
}
#undef GEN_PASS_DEF_ARITHTOAMDGPUCONVERSIONPASS
#endif
#ifdef GEN_PASS_DECL_ARITHTOARMSMECONVERSIONPASS
std::unique_ptr<::mlir::Pass> createArithToArmSMEConversionPass();
#undef GEN_PASS_DECL_ARITHTOARMSMECONVERSIONPASS
#endif
#ifdef GEN_PASS_DEF_ARITHTOARMSMECONVERSIONPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createArithToArmSMEConversionPass();
}
namespace impl {
template <typename DerivedT>
class ArithToArmSMEConversionPassBase : public ::mlir::OperationPass<> {
public:
using Base = ArithToArmSMEConversionPassBase;
ArithToArmSMEConversionPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ArithToArmSMEConversionPassBase(const ArithToArmSMEConversionPassBase &other) : ::mlir::OperationPass<>(other) {}
ArithToArmSMEConversionPassBase& operator=(const ArithToArmSMEConversionPassBase &) = delete;
ArithToArmSMEConversionPassBase(ArithToArmSMEConversionPassBase &&) = delete;
ArithToArmSMEConversionPassBase& operator=(ArithToArmSMEConversionPassBase &&) = delete;
~ArithToArmSMEConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arith-to-arm-sme");
}
::llvm::StringRef getArgument() const override { return "convert-arith-to-arm-sme"; }
::llvm::StringRef getDescription() const override { return "Convert Arith dialect to ArmSME dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ArithToArmSMEConversionPass");
}
::llvm::StringRef getName() const override { return "ArithToArmSMEConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arm_sme::ArmSMEDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ArithToArmSMEConversionPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createArithToArmSMEConversionPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createArithToArmSMEConversionPass() {
return impl::createArithToArmSMEConversionPass();
}
#undef GEN_PASS_DEF_ARITHTOARMSMECONVERSIONPASS
#endif
#ifdef GEN_PASS_DECL_ARITHTOLLVMCONVERSIONPASS
struct ArithToLLVMConversionPassOptions {
unsigned indexBitwidth = 0;
};
std::unique_ptr<::mlir::Pass> createArithToLLVMConversionPass();
std::unique_ptr<::mlir::Pass> createArithToLLVMConversionPass(ArithToLLVMConversionPassOptions options);
#undef GEN_PASS_DECL_ARITHTOLLVMCONVERSIONPASS
#endif
#ifdef GEN_PASS_DEF_ARITHTOLLVMCONVERSIONPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createArithToLLVMConversionPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createArithToLLVMConversionPass(ArithToLLVMConversionPassOptions options);
}
namespace impl {
template <typename DerivedT>
class ArithToLLVMConversionPassBase : public ::mlir::OperationPass<> {
public:
using Base = ArithToLLVMConversionPassBase;
ArithToLLVMConversionPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ArithToLLVMConversionPassBase(const ArithToLLVMConversionPassBase &other) : ::mlir::OperationPass<>(other) {}
ArithToLLVMConversionPassBase& operator=(const ArithToLLVMConversionPassBase &) = delete;
ArithToLLVMConversionPassBase(ArithToLLVMConversionPassBase &&) = delete;
ArithToLLVMConversionPassBase& operator=(ArithToLLVMConversionPassBase &&) = delete;
~ArithToLLVMConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arith-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-arith-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert Arith dialect to LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ArithToLLVMConversionPass");
}
::llvm::StringRef getName() const override { return "ArithToLLVMConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ArithToLLVMConversionPassBase<DerivedT>)
ArithToLLVMConversionPassBase(ArithToLLVMConversionPassOptions options) : ArithToLLVMConversionPassBase() {
indexBitwidth = std::move(options.indexBitwidth);
}
protected:
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
private:
friend std::unique_ptr<::mlir::Pass> createArithToLLVMConversionPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createArithToLLVMConversionPass(ArithToLLVMConversionPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createArithToLLVMConversionPass() {
return impl::createArithToLLVMConversionPass();
}
std::unique_ptr<::mlir::Pass> createArithToLLVMConversionPass(ArithToLLVMConversionPassOptions options) {
return impl::createArithToLLVMConversionPass(std::move(options));
}
#undef GEN_PASS_DEF_ARITHTOLLVMCONVERSIONPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTAMDGPUTOROCDL
struct ConvertAMDGPUToROCDLOptions {
std::string chipset = "gfx000";
};
#undef GEN_PASS_DECL_CONVERTAMDGPUTOROCDL
#endif
#ifdef GEN_PASS_DEF_CONVERTAMDGPUTOROCDL
namespace impl {
template <typename DerivedT>
class ConvertAMDGPUToROCDLBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertAMDGPUToROCDLBase;
ConvertAMDGPUToROCDLBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertAMDGPUToROCDLBase(const ConvertAMDGPUToROCDLBase &other) : ::mlir::OperationPass<>(other) {}
ConvertAMDGPUToROCDLBase& operator=(const ConvertAMDGPUToROCDLBase &) = delete;
ConvertAMDGPUToROCDLBase(ConvertAMDGPUToROCDLBase &&) = delete;
ConvertAMDGPUToROCDLBase& operator=(ConvertAMDGPUToROCDLBase &&) = delete;
~ConvertAMDGPUToROCDLBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-amdgpu-to-rocdl");
}
::llvm::StringRef getArgument() const override { return "convert-amdgpu-to-rocdl"; }
::llvm::StringRef getDescription() const override { return "Convert AMDGPU dialect to ROCDL dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertAMDGPUToROCDL");
}
::llvm::StringRef getName() const override { return "ConvertAMDGPUToROCDL"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
registry.insert<ROCDL::ROCDLDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertAMDGPUToROCDLBase<DerivedT>)
ConvertAMDGPUToROCDLBase(ConvertAMDGPUToROCDLOptions options) : ConvertAMDGPUToROCDLBase() {
chipset = std::move(options.chipset);
}
protected:
::mlir::Pass::Option<std::string> chipset{*this, "chipset", ::llvm::cl::desc("Chipset that these operations will run on"), ::llvm::cl::init("gfx000")};
private:
};
}
#undef GEN_PASS_DEF_CONVERTAMDGPUTOROCDL
#endif
#ifdef GEN_PASS_DECL_CONVERTAFFINEFORTOGPU
struct ConvertAffineForToGPUOptions {
unsigned numBlockDims = 1u;
unsigned numThreadDims = 1u;
};
#undef GEN_PASS_DECL_CONVERTAFFINEFORTOGPU
#endif
#ifdef GEN_PASS_DEF_CONVERTAFFINEFORTOGPU
namespace impl {
template <typename DerivedT>
class ConvertAffineForToGPUBase : public ::mlir::InterfacePass<FunctionOpInterface> {
public:
using Base = ConvertAffineForToGPUBase;
ConvertAffineForToGPUBase() : ::mlir::InterfacePass<FunctionOpInterface>(::mlir::TypeID::get<DerivedT>()) {}
ConvertAffineForToGPUBase(const ConvertAffineForToGPUBase &other) : ::mlir::InterfacePass<FunctionOpInterface>(other) {}
ConvertAffineForToGPUBase& operator=(const ConvertAffineForToGPUBase &) = delete;
ConvertAffineForToGPUBase(ConvertAffineForToGPUBase &&) = delete;
ConvertAffineForToGPUBase& operator=(ConvertAffineForToGPUBase &&) = delete;
~ConvertAffineForToGPUBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-affine-for-to-gpu");
}
::llvm::StringRef getArgument() const override { return "convert-affine-for-to-gpu"; }
::llvm::StringRef getDescription() const override { return "Convert top-level AffineFor Ops to GPU kernels"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertAffineForToGPU");
}
::llvm::StringRef getName() const override { return "ConvertAffineForToGPU"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<gpu::GPUDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertAffineForToGPUBase<DerivedT>)
ConvertAffineForToGPUBase(ConvertAffineForToGPUOptions options) : ConvertAffineForToGPUBase() {
numBlockDims = std::move(options.numBlockDims);
numThreadDims = std::move(options.numThreadDims);
}
protected:
::mlir::Pass::Option<unsigned> numBlockDims{*this, "gpu-block-dims", ::llvm::cl::desc("Number of GPU block dimensions for mapping"), ::llvm::cl::init(1u)};
::mlir::Pass::Option<unsigned> numThreadDims{*this, "gpu-thread-dims", ::llvm::cl::desc("Number of GPU thread dimensions for mapping"), ::llvm::cl::init(1u)};
private:
};
}
#undef GEN_PASS_DEF_CONVERTAFFINEFORTOGPU
#endif
#ifdef GEN_PASS_DECL_CONVERTAFFINETOSTANDARD
#undef GEN_PASS_DECL_CONVERTAFFINETOSTANDARD
#endif
#ifdef GEN_PASS_DEF_CONVERTAFFINETOSTANDARD
namespace impl {
template <typename DerivedT>
class ConvertAffineToStandardBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertAffineToStandardBase;
ConvertAffineToStandardBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertAffineToStandardBase(const ConvertAffineToStandardBase &other) : ::mlir::OperationPass<>(other) {}
ConvertAffineToStandardBase& operator=(const ConvertAffineToStandardBase &) = delete;
ConvertAffineToStandardBase(ConvertAffineToStandardBase &&) = delete;
ConvertAffineToStandardBase& operator=(ConvertAffineToStandardBase &&) = delete;
~ConvertAffineToStandardBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("lower-affine");
}
::llvm::StringRef getArgument() const override { return "lower-affine"; }
::llvm::StringRef getDescription() const override { return "Lower Affine operations to a combination of Standard and SCF operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertAffineToStandard");
}
::llvm::StringRef getName() const override { return "ConvertAffineToStandard"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<memref::MemRefDialect>();
registry.insert<scf::SCFDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertAffineToStandardBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTAFFINETOSTANDARD
#endif
#ifdef GEN_PASS_DECL_CONVERTARITHTOEMITC
std::unique_ptr<::mlir::Pass> createConvertArithToEmitC();
#undef GEN_PASS_DECL_CONVERTARITHTOEMITC
#endif
#ifdef GEN_PASS_DEF_CONVERTARITHTOEMITC
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertArithToEmitC();
}
namespace impl {
template <typename DerivedT>
class ConvertArithToEmitCBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertArithToEmitCBase;
ConvertArithToEmitCBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertArithToEmitCBase(const ConvertArithToEmitCBase &other) : ::mlir::OperationPass<>(other) {}
ConvertArithToEmitCBase& operator=(const ConvertArithToEmitCBase &) = delete;
ConvertArithToEmitCBase(ConvertArithToEmitCBase &&) = delete;
ConvertArithToEmitCBase& operator=(ConvertArithToEmitCBase &&) = delete;
~ConvertArithToEmitCBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arith-to-emitc");
}
::llvm::StringRef getArgument() const override { return "convert-arith-to-emitc"; }
::llvm::StringRef getDescription() const override { return "Convert Arith dialect to EmitC dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertArithToEmitC");
}
::llvm::StringRef getName() const override { return "ConvertArithToEmitC"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<emitc::EmitCDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertArithToEmitCBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createConvertArithToEmitC() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createConvertArithToEmitC() {
return impl::createConvertArithToEmitC();
}
#undef GEN_PASS_DEF_CONVERTARITHTOEMITC
#endif
#ifdef GEN_PASS_DECL_CONVERTARITHTOSPIRV
struct ConvertArithToSPIRVOptions {
bool emulateLT32BitScalarTypes = true;
};
#undef GEN_PASS_DECL_CONVERTARITHTOSPIRV
#endif
#ifdef GEN_PASS_DEF_CONVERTARITHTOSPIRV
namespace impl {
template <typename DerivedT>
class ConvertArithToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertArithToSPIRVBase;
ConvertArithToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertArithToSPIRVBase(const ConvertArithToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertArithToSPIRVBase& operator=(const ConvertArithToSPIRVBase &) = delete;
ConvertArithToSPIRVBase(ConvertArithToSPIRVBase &&) = delete;
ConvertArithToSPIRVBase& operator=(ConvertArithToSPIRVBase &&) = delete;
~ConvertArithToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arith-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-arith-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert Arith dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertArithToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertArithToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertArithToSPIRVBase<DerivedT>)
ConvertArithToSPIRVBase(ConvertArithToSPIRVOptions options) : ConvertArithToSPIRVBase() {
emulateLT32BitScalarTypes = std::move(options.emulateLT32BitScalarTypes);
}
protected:
::mlir::Pass::Option<bool> emulateLT32BitScalarTypes{*this, "emulate-lt-32-bit-scalar-types", ::llvm::cl::desc("Emulate narrower scalar types with 32-bit ones if not supported by the target"), ::llvm::cl::init(true)};
private:
};
}
#undef GEN_PASS_DEF_CONVERTARITHTOSPIRV
#endif
#ifdef GEN_PASS_DECL_CONVERTARMNEON2DTOINTR
#undef GEN_PASS_DECL_CONVERTARMNEON2DTOINTR
#endif
#ifdef GEN_PASS_DEF_CONVERTARMNEON2DTOINTR
namespace impl {
template <typename DerivedT>
class ConvertArmNeon2dToIntrBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertArmNeon2dToIntrBase;
ConvertArmNeon2dToIntrBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertArmNeon2dToIntrBase(const ConvertArmNeon2dToIntrBase &other) : ::mlir::OperationPass<>(other) {}
ConvertArmNeon2dToIntrBase& operator=(const ConvertArmNeon2dToIntrBase &) = delete;
ConvertArmNeon2dToIntrBase(ConvertArmNeon2dToIntrBase &&) = delete;
ConvertArmNeon2dToIntrBase& operator=(ConvertArmNeon2dToIntrBase &&) = delete;
~ConvertArmNeon2dToIntrBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("arm-neon-2d-to-intr");
}
::llvm::StringRef getArgument() const override { return "arm-neon-2d-to-intr"; }
::llvm::StringRef getDescription() const override { return "Convert Arm NEON structured ops to intrinsics"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertArmNeon2dToIntr");
}
::llvm::StringRef getName() const override { return "ConvertArmNeon2dToIntr"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arm_neon::ArmNeonDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertArmNeon2dToIntrBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTARMNEON2DTOINTR
#endif
#ifdef GEN_PASS_DECL_CONVERTARMSMETOLLVM
struct ConvertArmSMEToLLVMOptions {
bool dumpTileLiveRanges = false;
};
#undef GEN_PASS_DECL_CONVERTARMSMETOLLVM
#endif
#ifdef GEN_PASS_DEF_CONVERTARMSMETOLLVM
namespace impl {
template <typename DerivedT>
class ConvertArmSMEToLLVMBase : public ::mlir::InterfacePass<FunctionOpInterface> {
public:
using Base = ConvertArmSMEToLLVMBase;
ConvertArmSMEToLLVMBase() : ::mlir::InterfacePass<FunctionOpInterface>(::mlir::TypeID::get<DerivedT>()) {}
ConvertArmSMEToLLVMBase(const ConvertArmSMEToLLVMBase &other) : ::mlir::InterfacePass<FunctionOpInterface>(other) {}
ConvertArmSMEToLLVMBase& operator=(const ConvertArmSMEToLLVMBase &) = delete;
ConvertArmSMEToLLVMBase(ConvertArmSMEToLLVMBase &&) = delete;
ConvertArmSMEToLLVMBase& operator=(ConvertArmSMEToLLVMBase &&) = delete;
~ConvertArmSMEToLLVMBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arm-sme-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-arm-sme-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the ArmSME dialect into the LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertArmSMEToLLVM");
}
::llvm::StringRef getName() const override { return "ConvertArmSMEToLLVM"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arm_sme::ArmSMEDialect>();
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertArmSMEToLLVMBase<DerivedT>)
ConvertArmSMEToLLVMBase(ConvertArmSMEToLLVMOptions options) : ConvertArmSMEToLLVMBase() {
dumpTileLiveRanges = std::move(options.dumpTileLiveRanges);
}
protected:
::mlir::Pass::Option<bool> dumpTileLiveRanges{*this, "dump-tile-live-ranges", ::llvm::cl::desc("Dump the live ranges of SME tiles (for debugging)"), ::llvm::cl::init(false)};
private:
};
}
#undef GEN_PASS_DEF_CONVERTARMSMETOLLVM
#endif
#ifdef GEN_PASS_DECL_CONVERTARMSMETOSCF
#undef GEN_PASS_DECL_CONVERTARMSMETOSCF
#endif
#ifdef GEN_PASS_DEF_CONVERTARMSMETOSCF
namespace impl {
template <typename DerivedT>
class ConvertArmSMEToSCFBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertArmSMEToSCFBase;
ConvertArmSMEToSCFBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertArmSMEToSCFBase(const ConvertArmSMEToSCFBase &other) : ::mlir::OperationPass<>(other) {}
ConvertArmSMEToSCFBase& operator=(const ConvertArmSMEToSCFBase &) = delete;
ConvertArmSMEToSCFBase(ConvertArmSMEToSCFBase &&) = delete;
ConvertArmSMEToSCFBase& operator=(ConvertArmSMEToSCFBase &&) = delete;
~ConvertArmSMEToSCFBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arm-sme-to-scf");
}
::llvm::StringRef getArgument() const override { return "convert-arm-sme-to-scf"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the ArmSME dialect into the SCF dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertArmSMEToSCF");
}
::llvm::StringRef getName() const override { return "ConvertArmSMEToSCF"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<scf::SCFDialect>();
registry.insert<arith::ArithDialect>();
registry.insert<vector::VectorDialect>();
registry.insert<arm_sme::ArmSMEDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertArmSMEToSCFBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTARMSMETOSCF
#endif
#ifdef GEN_PASS_DECL_CONVERTASYNCTOLLVMPASS
std::unique_ptr<::mlir::Pass> createConvertAsyncToLLVMPass();
#undef GEN_PASS_DECL_CONVERTASYNCTOLLVMPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTASYNCTOLLVMPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertAsyncToLLVMPass();
}
namespace impl {
template <typename DerivedT>
class ConvertAsyncToLLVMPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertAsyncToLLVMPassBase;
ConvertAsyncToLLVMPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertAsyncToLLVMPassBase(const ConvertAsyncToLLVMPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertAsyncToLLVMPassBase& operator=(const ConvertAsyncToLLVMPassBase &) = delete;
ConvertAsyncToLLVMPassBase(ConvertAsyncToLLVMPassBase &&) = delete;
ConvertAsyncToLLVMPassBase& operator=(ConvertAsyncToLLVMPassBase &&) = delete;
~ConvertAsyncToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-async-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-async-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert the operations from the async dialect into the LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertAsyncToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertAsyncToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
registry.insert<async::AsyncDialect>();
registry.insert<LLVM::LLVMDialect>();
registry.insert<func::FuncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertAsyncToLLVMPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createConvertAsyncToLLVMPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createConvertAsyncToLLVMPass() {
return impl::createConvertAsyncToLLVMPass();
}
#undef GEN_PASS_DEF_CONVERTASYNCTOLLVMPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTBUFFERIZATIONTOMEMREF
#undef GEN_PASS_DECL_CONVERTBUFFERIZATIONTOMEMREF
#endif
#ifdef GEN_PASS_DEF_CONVERTBUFFERIZATIONTOMEMREF
namespace impl {
template <typename DerivedT>
class ConvertBufferizationToMemRefBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertBufferizationToMemRefBase;
ConvertBufferizationToMemRefBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertBufferizationToMemRefBase(const ConvertBufferizationToMemRefBase &other) : ::mlir::OperationPass<>(other) {}
ConvertBufferizationToMemRefBase& operator=(const ConvertBufferizationToMemRefBase &) = delete;
ConvertBufferizationToMemRefBase(ConvertBufferizationToMemRefBase &&) = delete;
ConvertBufferizationToMemRefBase& operator=(ConvertBufferizationToMemRefBase &&) = delete;
~ConvertBufferizationToMemRefBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-bufferization-to-memref");
}
::llvm::StringRef getArgument() const override { return "convert-bufferization-to-memref"; }
::llvm::StringRef getDescription() const override { return "Convert operations from the Bufferization dialect to the MemRef dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertBufferizationToMemRef");
}
::llvm::StringRef getName() const override { return "ConvertBufferizationToMemRef"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
registry.insert<memref::MemRefDialect>();
registry.insert<scf::SCFDialect>();
registry.insert<func::FuncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertBufferizationToMemRefBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTBUFFERIZATIONTOMEMREF
#endif
#ifdef GEN_PASS_DECL_CONVERTCOMPLEXTOLLVMPASS
std::unique_ptr<::mlir::Pass> createConvertComplexToLLVMPass();
#undef GEN_PASS_DECL_CONVERTCOMPLEXTOLLVMPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTCOMPLEXTOLLVMPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertComplexToLLVMPass();
}
namespace impl {
template <typename DerivedT>
class ConvertComplexToLLVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertComplexToLLVMPassBase;
ConvertComplexToLLVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertComplexToLLVMPassBase(const ConvertComplexToLLVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertComplexToLLVMPassBase& operator=(const ConvertComplexToLLVMPassBase &) = delete;
ConvertComplexToLLVMPassBase(ConvertComplexToLLVMPassBase &&) = delete;
ConvertComplexToLLVMPassBase& operator=(ConvertComplexToLLVMPassBase &&) = delete;
~ConvertComplexToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-complex-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-complex-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert Complex dialect to LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertComplexToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertComplexToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertComplexToLLVMPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createConvertComplexToLLVMPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createConvertComplexToLLVMPass() {
return impl::createConvertComplexToLLVMPass();
}
#undef GEN_PASS_DEF_CONVERTCOMPLEXTOLLVMPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTCOMPLEXTOLIBM
#undef GEN_PASS_DECL_CONVERTCOMPLEXTOLIBM
#endif
#ifdef GEN_PASS_DEF_CONVERTCOMPLEXTOLIBM
namespace impl {
template <typename DerivedT>
class ConvertComplexToLibmBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertComplexToLibmBase;
ConvertComplexToLibmBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertComplexToLibmBase(const ConvertComplexToLibmBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertComplexToLibmBase& operator=(const ConvertComplexToLibmBase &) = delete;
ConvertComplexToLibmBase(ConvertComplexToLibmBase &&) = delete;
ConvertComplexToLibmBase& operator=(ConvertComplexToLibmBase &&) = delete;
~ConvertComplexToLibmBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-complex-to-libm");
}
::llvm::StringRef getArgument() const override { return "convert-complex-to-libm"; }
::llvm::StringRef getDescription() const override { return "Convert Complex dialect to libm calls"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertComplexToLibm");
}
::llvm::StringRef getName() const override { return "ConvertComplexToLibm"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<func::FuncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertComplexToLibmBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTCOMPLEXTOLIBM
#endif
#ifdef GEN_PASS_DECL_CONVERTCOMPLEXTOSPIRVPASS
std::unique_ptr<::mlir::Pass> createConvertComplexToSPIRVPass();
#undef GEN_PASS_DECL_CONVERTCOMPLEXTOSPIRVPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTCOMPLEXTOSPIRVPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertComplexToSPIRVPass();
}
namespace impl {
template <typename DerivedT>
class ConvertComplexToSPIRVPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertComplexToSPIRVPassBase;
ConvertComplexToSPIRVPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertComplexToSPIRVPassBase(const ConvertComplexToSPIRVPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertComplexToSPIRVPassBase& operator=(const ConvertComplexToSPIRVPassBase &) = delete;
ConvertComplexToSPIRVPassBase(ConvertComplexToSPIRVPassBase &&) = delete;
ConvertComplexToSPIRVPassBase& operator=(ConvertComplexToSPIRVPassBase &&) = delete;
~ConvertComplexToSPIRVPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-complex-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-complex-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert Complex dialect to SPIRV dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertComplexToSPIRVPass");
}
::llvm::StringRef getName() const override { return "ConvertComplexToSPIRVPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertComplexToSPIRVPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createConvertComplexToSPIRVPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createConvertComplexToSPIRVPass() {
return impl::createConvertComplexToSPIRVPass();
}
#undef GEN_PASS_DEF_CONVERTCOMPLEXTOSPIRVPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTCOMPLEXTOSTANDARD
#undef GEN_PASS_DECL_CONVERTCOMPLEXTOSTANDARD
#endif
#ifdef GEN_PASS_DEF_CONVERTCOMPLEXTOSTANDARD
namespace impl {
template <typename DerivedT>
class ConvertComplexToStandardBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertComplexToStandardBase;
ConvertComplexToStandardBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertComplexToStandardBase(const ConvertComplexToStandardBase &other) : ::mlir::OperationPass<>(other) {}
ConvertComplexToStandardBase& operator=(const ConvertComplexToStandardBase &) = delete;
ConvertComplexToStandardBase(ConvertComplexToStandardBase &&) = delete;
ConvertComplexToStandardBase& operator=(ConvertComplexToStandardBase &&) = delete;
~ConvertComplexToStandardBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-complex-to-standard");
}
::llvm::StringRef getArgument() const override { return "convert-complex-to-standard"; }
::llvm::StringRef getDescription() const override { return "Convert Complex dialect to standard dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertComplexToStandard");
}
::llvm::StringRef getName() const override { return "ConvertComplexToStandard"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<math::MathDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertComplexToStandardBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTCOMPLEXTOSTANDARD
#endif
#ifdef GEN_PASS_DECL_CONVERTCONTROLFLOWTOLLVMPASS
struct ConvertControlFlowToLLVMPassOptions {
unsigned indexBitwidth = 0;
};
std::unique_ptr<::mlir::Pass> createConvertControlFlowToLLVMPass();
std::unique_ptr<::mlir::Pass> createConvertControlFlowToLLVMPass(ConvertControlFlowToLLVMPassOptions options);
#undef GEN_PASS_DECL_CONVERTCONTROLFLOWTOLLVMPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTCONTROLFLOWTOLLVMPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertControlFlowToLLVMPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertControlFlowToLLVMPass(ConvertControlFlowToLLVMPassOptions options);
}
namespace impl {
template <typename DerivedT>
class ConvertControlFlowToLLVMPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertControlFlowToLLVMPassBase;
ConvertControlFlowToLLVMPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertControlFlowToLLVMPassBase(const ConvertControlFlowToLLVMPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertControlFlowToLLVMPassBase& operator=(const ConvertControlFlowToLLVMPassBase &) = delete;
ConvertControlFlowToLLVMPassBase(ConvertControlFlowToLLVMPassBase &&) = delete;
ConvertControlFlowToLLVMPassBase& operator=(ConvertControlFlowToLLVMPassBase &&) = delete;
~ConvertControlFlowToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-cf-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-cf-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert ControlFlow operations to the LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertControlFlowToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertControlFlowToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertControlFlowToLLVMPassBase<DerivedT>)
ConvertControlFlowToLLVMPassBase(ConvertControlFlowToLLVMPassOptions options) : ConvertControlFlowToLLVMPassBase() {
indexBitwidth = std::move(options.indexBitwidth);
}
protected:
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
private:
friend std::unique_ptr<::mlir::Pass> createConvertControlFlowToLLVMPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createConvertControlFlowToLLVMPass(ConvertControlFlowToLLVMPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createConvertControlFlowToLLVMPass() {
return impl::createConvertControlFlowToLLVMPass();
}
std::unique_ptr<::mlir::Pass> createConvertControlFlowToLLVMPass(ConvertControlFlowToLLVMPassOptions options) {
return impl::createConvertControlFlowToLLVMPass(std::move(options));
}
#undef GEN_PASS_DEF_CONVERTCONTROLFLOWTOLLVMPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTCONTROLFLOWTOSPIRV
struct ConvertControlFlowToSPIRVOptions {
bool emulateLT32BitScalarTypes = true;
};
#undef GEN_PASS_DECL_CONVERTCONTROLFLOWTOSPIRV
#endif
#ifdef GEN_PASS_DEF_CONVERTCONTROLFLOWTOSPIRV
namespace impl {
template <typename DerivedT>
class ConvertControlFlowToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertControlFlowToSPIRVBase;
ConvertControlFlowToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertControlFlowToSPIRVBase(const ConvertControlFlowToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertControlFlowToSPIRVBase& operator=(const ConvertControlFlowToSPIRVBase &) = delete;
ConvertControlFlowToSPIRVBase(ConvertControlFlowToSPIRVBase &&) = delete;
ConvertControlFlowToSPIRVBase& operator=(ConvertControlFlowToSPIRVBase &&) = delete;
~ConvertControlFlowToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-cf-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-cf-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert ControlFlow dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertControlFlowToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertControlFlowToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertControlFlowToSPIRVBase<DerivedT>)
ConvertControlFlowToSPIRVBase(ConvertControlFlowToSPIRVOptions options) : ConvertControlFlowToSPIRVBase() {
emulateLT32BitScalarTypes = std::move(options.emulateLT32BitScalarTypes);
}
protected:
::mlir::Pass::Option<bool> emulateLT32BitScalarTypes{*this, "emulate-lt-32-bit-scalar-types", ::llvm::cl::desc("Emulate narrower scalar types with 32-bit ones if not supported by the target"), ::llvm::cl::init(true)};
private:
};
}
#undef GEN_PASS_DEF_CONVERTCONTROLFLOWTOSPIRV
#endif
#ifdef GEN_PASS_DECL_CONVERTFUNCTOEMITC
std::unique_ptr<::mlir::Pass> createConvertFuncToEmitC();
#undef GEN_PASS_DECL_CONVERTFUNCTOEMITC
#endif
#ifdef GEN_PASS_DEF_CONVERTFUNCTOEMITC
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertFuncToEmitC();
}
namespace impl {
template <typename DerivedT>
class ConvertFuncToEmitCBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertFuncToEmitCBase;
ConvertFuncToEmitCBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertFuncToEmitCBase(const ConvertFuncToEmitCBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertFuncToEmitCBase& operator=(const ConvertFuncToEmitCBase &) = delete;
ConvertFuncToEmitCBase(ConvertFuncToEmitCBase &&) = delete;
ConvertFuncToEmitCBase& operator=(ConvertFuncToEmitCBase &&) = delete;
~ConvertFuncToEmitCBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-func-to-emitc");
}
::llvm::StringRef getArgument() const override { return "convert-func-to-emitc"; }
::llvm::StringRef getDescription() const override { return "Convert Func dialect to EmitC dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertFuncToEmitC");
}
::llvm::StringRef getName() const override { return "ConvertFuncToEmitC"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<emitc::EmitCDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertFuncToEmitCBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createConvertFuncToEmitC() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createConvertFuncToEmitC() {
return impl::createConvertFuncToEmitC();
}
#undef GEN_PASS_DEF_CONVERTFUNCTOEMITC
#endif
#ifdef GEN_PASS_DECL_CONVERTFUNCTOLLVMPASS
struct ConvertFuncToLLVMPassOptions {
bool useBarePtrCallConv = false;
unsigned indexBitwidth = 0;
};
std::unique_ptr<::mlir::Pass> createConvertFuncToLLVMPass();
std::unique_ptr<::mlir::Pass> createConvertFuncToLLVMPass(ConvertFuncToLLVMPassOptions options);
#undef GEN_PASS_DECL_CONVERTFUNCTOLLVMPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTFUNCTOLLVMPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertFuncToLLVMPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertFuncToLLVMPass(ConvertFuncToLLVMPassOptions options);
}
namespace impl {
template <typename DerivedT>
class ConvertFuncToLLVMPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertFuncToLLVMPassBase;
ConvertFuncToLLVMPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertFuncToLLVMPassBase(const ConvertFuncToLLVMPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertFuncToLLVMPassBase& operator=(const ConvertFuncToLLVMPassBase &) = delete;
ConvertFuncToLLVMPassBase(ConvertFuncToLLVMPassBase &&) = delete;
ConvertFuncToLLVMPassBase& operator=(ConvertFuncToLLVMPassBase &&) = delete;
~ConvertFuncToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-func-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-func-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert from the Func dialect to the LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertFuncToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertFuncToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertFuncToLLVMPassBase<DerivedT>)
ConvertFuncToLLVMPassBase(ConvertFuncToLLVMPassOptions options) : ConvertFuncToLLVMPassBase() {
useBarePtrCallConv = std::move(options.useBarePtrCallConv);
indexBitwidth = std::move(options.indexBitwidth);
}
protected:
::mlir::Pass::Option<bool> useBarePtrCallConv{*this, "use-bare-ptr-memref-call-conv", ::llvm::cl::desc("Replace FuncOp's MemRef arguments with bare pointers to the MemRef element types"), ::llvm::cl::init(false)};
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
private:
friend std::unique_ptr<::mlir::Pass> createConvertFuncToLLVMPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createConvertFuncToLLVMPass(ConvertFuncToLLVMPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createConvertFuncToLLVMPass() {
return impl::createConvertFuncToLLVMPass();
}
std::unique_ptr<::mlir::Pass> createConvertFuncToLLVMPass(ConvertFuncToLLVMPassOptions options) {
return impl::createConvertFuncToLLVMPass(std::move(options));
}
#undef GEN_PASS_DEF_CONVERTFUNCTOLLVMPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTFUNCTOSPIRV
struct ConvertFuncToSPIRVOptions {
bool emulateLT32BitScalarTypes = true;
};
#undef GEN_PASS_DECL_CONVERTFUNCTOSPIRV
#endif
#ifdef GEN_PASS_DEF_CONVERTFUNCTOSPIRV
namespace impl {
template <typename DerivedT>
class ConvertFuncToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertFuncToSPIRVBase;
ConvertFuncToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertFuncToSPIRVBase(const ConvertFuncToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertFuncToSPIRVBase& operator=(const ConvertFuncToSPIRVBase &) = delete;
ConvertFuncToSPIRVBase(ConvertFuncToSPIRVBase &&) = delete;
ConvertFuncToSPIRVBase& operator=(ConvertFuncToSPIRVBase &&) = delete;
~ConvertFuncToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-func-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-func-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert Func dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertFuncToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertFuncToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertFuncToSPIRVBase<DerivedT>)
ConvertFuncToSPIRVBase(ConvertFuncToSPIRVOptions options) : ConvertFuncToSPIRVBase() {
emulateLT32BitScalarTypes = std::move(options.emulateLT32BitScalarTypes);
}
protected:
::mlir::Pass::Option<bool> emulateLT32BitScalarTypes{*this, "emulate-lt-32-bit-scalar-types", ::llvm::cl::desc("Emulate narrower scalar types with 32-bit ones if not supported by the target"), ::llvm::cl::init(true)};
private:
};
}
#undef GEN_PASS_DEF_CONVERTFUNCTOSPIRV
#endif
#ifdef GEN_PASS_DECL_CONVERTGPUTOSPIRV
struct ConvertGPUToSPIRVOptions {
bool use64bitIndex = false;
};
#undef GEN_PASS_DECL_CONVERTGPUTOSPIRV
#endif
#ifdef GEN_PASS_DEF_CONVERTGPUTOSPIRV
namespace impl {
template <typename DerivedT>
class ConvertGPUToSPIRVBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertGPUToSPIRVBase;
ConvertGPUToSPIRVBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertGPUToSPIRVBase(const ConvertGPUToSPIRVBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertGPUToSPIRVBase& operator=(const ConvertGPUToSPIRVBase &) = delete;
ConvertGPUToSPIRVBase(ConvertGPUToSPIRVBase &&) = delete;
ConvertGPUToSPIRVBase& operator=(ConvertGPUToSPIRVBase &&) = delete;
~ConvertGPUToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-gpu-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-gpu-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert GPU dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertGPUToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertGPUToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<func::FuncDialect>();
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertGPUToSPIRVBase<DerivedT>)
ConvertGPUToSPIRVBase(ConvertGPUToSPIRVOptions options) : ConvertGPUToSPIRVBase() {
use64bitIndex = std::move(options.use64bitIndex);
}
protected:
::mlir::Pass::Option<bool> use64bitIndex{*this, "use-64bit-index", ::llvm::cl::desc("Use 64-bit integers to convert index types"), ::llvm::cl::init(false)};
private:
};
}
#undef GEN_PASS_DEF_CONVERTGPUTOSPIRV
#endif
#ifdef GEN_PASS_DECL_CONVERTGPULAUNCHFUNCTOVULKANLAUNCHFUNC
#undef GEN_PASS_DECL_CONVERTGPULAUNCHFUNCTOVULKANLAUNCHFUNC
#endif
#ifdef GEN_PASS_DEF_CONVERTGPULAUNCHFUNCTOVULKANLAUNCHFUNC
namespace impl {
template <typename DerivedT>
class ConvertGpuLaunchFuncToVulkanLaunchFuncBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertGpuLaunchFuncToVulkanLaunchFuncBase;
ConvertGpuLaunchFuncToVulkanLaunchFuncBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertGpuLaunchFuncToVulkanLaunchFuncBase(const ConvertGpuLaunchFuncToVulkanLaunchFuncBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertGpuLaunchFuncToVulkanLaunchFuncBase& operator=(const ConvertGpuLaunchFuncToVulkanLaunchFuncBase &) = delete;
ConvertGpuLaunchFuncToVulkanLaunchFuncBase(ConvertGpuLaunchFuncToVulkanLaunchFuncBase &&) = delete;
ConvertGpuLaunchFuncToVulkanLaunchFuncBase& operator=(ConvertGpuLaunchFuncToVulkanLaunchFuncBase &&) = delete;
~ConvertGpuLaunchFuncToVulkanLaunchFuncBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-gpu-launch-to-vulkan-launch");
}
::llvm::StringRef getArgument() const override { return "convert-gpu-launch-to-vulkan-launch"; }
::llvm::StringRef getDescription() const override { return "Convert gpu.launch_func to vulkanLaunch external call"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertGpuLaunchFuncToVulkanLaunchFunc");
}
::llvm::StringRef getName() const override { return "ConvertGpuLaunchFuncToVulkanLaunchFunc"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertGpuLaunchFuncToVulkanLaunchFuncBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTGPULAUNCHFUNCTOVULKANLAUNCHFUNC
#endif
#ifdef GEN_PASS_DECL_CONVERTGPUOPSTOLLVMSPVOPS
struct ConvertGpuOpsToLLVMSPVOpsOptions {
unsigned indexBitwidth = 0;
};
std::unique_ptr<::mlir::Pass> createConvertGpuOpsToLLVMSPVOps();
std::unique_ptr<::mlir::Pass> createConvertGpuOpsToLLVMSPVOps(ConvertGpuOpsToLLVMSPVOpsOptions options);
#undef GEN_PASS_DECL_CONVERTGPUOPSTOLLVMSPVOPS
#endif
#ifdef GEN_PASS_DEF_CONVERTGPUOPSTOLLVMSPVOPS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertGpuOpsToLLVMSPVOps();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertGpuOpsToLLVMSPVOps(ConvertGpuOpsToLLVMSPVOpsOptions options);
}
namespace impl {
template <typename DerivedT>
class ConvertGpuOpsToLLVMSPVOpsBase : public ::mlir::OperationPass<gpu::GPUModuleOp> {
public:
using Base = ConvertGpuOpsToLLVMSPVOpsBase;
ConvertGpuOpsToLLVMSPVOpsBase() : ::mlir::OperationPass<gpu::GPUModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertGpuOpsToLLVMSPVOpsBase(const ConvertGpuOpsToLLVMSPVOpsBase &other) : ::mlir::OperationPass<gpu::GPUModuleOp>(other) {}
ConvertGpuOpsToLLVMSPVOpsBase& operator=(const ConvertGpuOpsToLLVMSPVOpsBase &) = delete;
ConvertGpuOpsToLLVMSPVOpsBase(ConvertGpuOpsToLLVMSPVOpsBase &&) = delete;
ConvertGpuOpsToLLVMSPVOpsBase& operator=(ConvertGpuOpsToLLVMSPVOpsBase &&) = delete;
~ConvertGpuOpsToLLVMSPVOpsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-gpu-to-llvm-spv");
}
::llvm::StringRef getArgument() const override { return "convert-gpu-to-llvm-spv"; }
::llvm::StringRef getDescription() const override { return "Generate LLVM operations to be ingested by a SPIR-V backend for gpu operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertGpuOpsToLLVMSPVOps");
}
::llvm::StringRef getName() const override { return "ConvertGpuOpsToLLVMSPVOps"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertGpuOpsToLLVMSPVOpsBase<DerivedT>)
ConvertGpuOpsToLLVMSPVOpsBase(ConvertGpuOpsToLLVMSPVOpsOptions options) : ConvertGpuOpsToLLVMSPVOpsBase() {
indexBitwidth = std::move(options.indexBitwidth);
}
protected:
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
private:
friend std::unique_ptr<::mlir::Pass> createConvertGpuOpsToLLVMSPVOps() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createConvertGpuOpsToLLVMSPVOps(ConvertGpuOpsToLLVMSPVOpsOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createConvertGpuOpsToLLVMSPVOps() {
return impl::createConvertGpuOpsToLLVMSPVOps();
}
std::unique_ptr<::mlir::Pass> createConvertGpuOpsToLLVMSPVOps(ConvertGpuOpsToLLVMSPVOpsOptions options) {
return impl::createConvertGpuOpsToLLVMSPVOps(std::move(options));
}
#undef GEN_PASS_DEF_CONVERTGPUOPSTOLLVMSPVOPS
#endif
#ifdef GEN_PASS_DECL_CONVERTGPUOPSTONVVMOPS
struct ConvertGpuOpsToNVVMOpsOptions {
unsigned indexBitwidth = 0;
bool hasRedux = false;
bool useBarePtrCallConv = false;
};
std::unique_ptr<::mlir::Pass> createConvertGpuOpsToNVVMOps();
std::unique_ptr<::mlir::Pass> createConvertGpuOpsToNVVMOps(ConvertGpuOpsToNVVMOpsOptions options);
#undef GEN_PASS_DECL_CONVERTGPUOPSTONVVMOPS
#endif
#ifdef GEN_PASS_DEF_CONVERTGPUOPSTONVVMOPS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertGpuOpsToNVVMOps();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertGpuOpsToNVVMOps(ConvertGpuOpsToNVVMOpsOptions options);
}
namespace impl {
template <typename DerivedT>
class ConvertGpuOpsToNVVMOpsBase : public ::mlir::OperationPass<gpu::GPUModuleOp> {
public:
using Base = ConvertGpuOpsToNVVMOpsBase;
ConvertGpuOpsToNVVMOpsBase() : ::mlir::OperationPass<gpu::GPUModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertGpuOpsToNVVMOpsBase(const ConvertGpuOpsToNVVMOpsBase &other) : ::mlir::OperationPass<gpu::GPUModuleOp>(other) {}
ConvertGpuOpsToNVVMOpsBase& operator=(const ConvertGpuOpsToNVVMOpsBase &) = delete;
ConvertGpuOpsToNVVMOpsBase(ConvertGpuOpsToNVVMOpsBase &&) = delete;
ConvertGpuOpsToNVVMOpsBase& operator=(ConvertGpuOpsToNVVMOpsBase &&) = delete;
~ConvertGpuOpsToNVVMOpsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-gpu-to-nvvm");
}
::llvm::StringRef getArgument() const override { return "convert-gpu-to-nvvm"; }
::llvm::StringRef getDescription() const override { return "Generate NVVM operations for gpu operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertGpuOpsToNVVMOps");
}
::llvm::StringRef getName() const override { return "ConvertGpuOpsToNVVMOps"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<cf::ControlFlowDialect>();
registry.insert<memref::MemRefDialect>();
registry.insert<NVVM::NVVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertGpuOpsToNVVMOpsBase<DerivedT>)
ConvertGpuOpsToNVVMOpsBase(ConvertGpuOpsToNVVMOpsOptions options) : ConvertGpuOpsToNVVMOpsBase() {
indexBitwidth = std::move(options.indexBitwidth);
hasRedux = std::move(options.hasRedux);
useBarePtrCallConv = std::move(options.useBarePtrCallConv);
}
protected:
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
::mlir::Pass::Option<bool> hasRedux{*this, "has-redux", ::llvm::cl::desc("Target gpu supports redux"), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> useBarePtrCallConv{*this, "use-bare-ptr-memref-call-conv", ::llvm::cl::desc("Replace memref arguments in GPU functions with bare pointers. All memrefs must have static shape."), ::llvm::cl::init(false)};
private:
friend std::unique_ptr<::mlir::Pass> createConvertGpuOpsToNVVMOps() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createConvertGpuOpsToNVVMOps(ConvertGpuOpsToNVVMOpsOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createConvertGpuOpsToNVVMOps() {
return impl::createConvertGpuOpsToNVVMOps();
}
std::unique_ptr<::mlir::Pass> createConvertGpuOpsToNVVMOps(ConvertGpuOpsToNVVMOpsOptions options) {
return impl::createConvertGpuOpsToNVVMOps(std::move(options));
}
#undef GEN_PASS_DEF_CONVERTGPUOPSTONVVMOPS
#endif
#ifdef GEN_PASS_DECL_CONVERTGPUOPSTOROCDLOPS
struct ConvertGpuOpsToROCDLOpsOptions {
std::string chipset = "gfx000";
unsigned indexBitwidth = 0;
bool useBarePtrCallConv = false;
::mlir::gpu::amd::Runtime runtime = ::mlir::gpu::amd::Runtime::Unknown;
};
#undef GEN_PASS_DECL_CONVERTGPUOPSTOROCDLOPS
#endif
#ifdef GEN_PASS_DEF_CONVERTGPUOPSTOROCDLOPS
namespace impl {
template <typename DerivedT>
class ConvertGpuOpsToROCDLOpsBase : public ::mlir::OperationPass<gpu::GPUModuleOp> {
public:
using Base = ConvertGpuOpsToROCDLOpsBase;
ConvertGpuOpsToROCDLOpsBase() : ::mlir::OperationPass<gpu::GPUModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertGpuOpsToROCDLOpsBase(const ConvertGpuOpsToROCDLOpsBase &other) : ::mlir::OperationPass<gpu::GPUModuleOp>(other) {}
ConvertGpuOpsToROCDLOpsBase& operator=(const ConvertGpuOpsToROCDLOpsBase &) = delete;
ConvertGpuOpsToROCDLOpsBase(ConvertGpuOpsToROCDLOpsBase &&) = delete;
ConvertGpuOpsToROCDLOpsBase& operator=(ConvertGpuOpsToROCDLOpsBase &&) = delete;
~ConvertGpuOpsToROCDLOpsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-gpu-to-rocdl");
}
::llvm::StringRef getArgument() const override { return "convert-gpu-to-rocdl"; }
::llvm::StringRef getDescription() const override { return "Generate ROCDL operations for gpu operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertGpuOpsToROCDLOps");
}
::llvm::StringRef getName() const override { return "ConvertGpuOpsToROCDLOps"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<ROCDL::ROCDLDialect>();
registry.insert<cf::ControlFlowDialect>();
registry.insert<memref::MemRefDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertGpuOpsToROCDLOpsBase<DerivedT>)
ConvertGpuOpsToROCDLOpsBase(ConvertGpuOpsToROCDLOpsOptions options) : ConvertGpuOpsToROCDLOpsBase() {
chipset = std::move(options.chipset);
indexBitwidth = std::move(options.indexBitwidth);
useBarePtrCallConv = std::move(options.useBarePtrCallConv);
runtime = std::move(options.runtime);
}
protected:
::mlir::Pass::Option<std::string> chipset{*this, "chipset", ::llvm::cl::desc("Chipset that these operations will run on"), ::llvm::cl::init("gfx000")};
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
::mlir::Pass::Option<bool> useBarePtrCallConv{*this, "use-bare-ptr-memref-call-conv", ::llvm::cl::desc("Replace memref arguments in GPU functions with bare pointers.All memrefs must have static shape"), ::llvm::cl::init(false)};
::mlir::Pass::Option<::mlir::gpu::amd::Runtime> runtime{*this, "runtime", ::llvm::cl::desc("Runtime code will be run on (default is Unknown, can also use HIP or OpenCl)"), ::llvm::cl::init(::mlir::gpu::amd::Runtime::Unknown), ::llvm::cl::values(
clEnumValN(::mlir::gpu::amd::Runtime::Unknown, "unknown", "Unknown (default)"),
clEnumValN(::mlir::gpu::amd::Runtime::HIP, "HIP", "HIP"),
clEnumValN(::mlir::gpu::amd::Runtime::OpenCL, "OpenCL", "OpenCL")
)};
private:
};
}
#undef GEN_PASS_DEF_CONVERTGPUOPSTOROCDLOPS
#endif
#ifdef GEN_PASS_DECL_CONVERTINDEXTOLLVMPASS
struct ConvertIndexToLLVMPassOptions {
unsigned indexBitwidth = 0;
};
std::unique_ptr<::mlir::Pass> createConvertIndexToLLVMPass();
std::unique_ptr<::mlir::Pass> createConvertIndexToLLVMPass(ConvertIndexToLLVMPassOptions options);
#undef GEN_PASS_DECL_CONVERTINDEXTOLLVMPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTINDEXTOLLVMPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertIndexToLLVMPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertIndexToLLVMPass(ConvertIndexToLLVMPassOptions options);
}
namespace impl {
template <typename DerivedT>
class ConvertIndexToLLVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertIndexToLLVMPassBase;
ConvertIndexToLLVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertIndexToLLVMPassBase(const ConvertIndexToLLVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertIndexToLLVMPassBase& operator=(const ConvertIndexToLLVMPassBase &) = delete;
ConvertIndexToLLVMPassBase(ConvertIndexToLLVMPassBase &&) = delete;
ConvertIndexToLLVMPassBase& operator=(ConvertIndexToLLVMPassBase &&) = delete;
~ConvertIndexToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-index-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-index-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Lower the `index` dialect to the `llvm` dialect."; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertIndexToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertIndexToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<::mlir::LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertIndexToLLVMPassBase<DerivedT>)
ConvertIndexToLLVMPassBase(ConvertIndexToLLVMPassOptions options) : ConvertIndexToLLVMPassBase() {
indexBitwidth = std::move(options.indexBitwidth);
}
protected:
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
private:
friend std::unique_ptr<::mlir::Pass> createConvertIndexToLLVMPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createConvertIndexToLLVMPass(ConvertIndexToLLVMPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createConvertIndexToLLVMPass() {
return impl::createConvertIndexToLLVMPass();
}
std::unique_ptr<::mlir::Pass> createConvertIndexToLLVMPass(ConvertIndexToLLVMPassOptions options) {
return impl::createConvertIndexToLLVMPass(std::move(options));
}
#undef GEN_PASS_DEF_CONVERTINDEXTOLLVMPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTINDEXTOSPIRVPASS
struct ConvertIndexToSPIRVPassOptions {
bool use64bitIndex = false;
};
std::unique_ptr<::mlir::Pass> createConvertIndexToSPIRVPass();
std::unique_ptr<::mlir::Pass> createConvertIndexToSPIRVPass(ConvertIndexToSPIRVPassOptions options);
#undef GEN_PASS_DECL_CONVERTINDEXTOSPIRVPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTINDEXTOSPIRVPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertIndexToSPIRVPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertIndexToSPIRVPass(ConvertIndexToSPIRVPassOptions options);
}
namespace impl {
template <typename DerivedT>
class ConvertIndexToSPIRVPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertIndexToSPIRVPassBase;
ConvertIndexToSPIRVPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertIndexToSPIRVPassBase(const ConvertIndexToSPIRVPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertIndexToSPIRVPassBase& operator=(const ConvertIndexToSPIRVPassBase &) = delete;
ConvertIndexToSPIRVPassBase(ConvertIndexToSPIRVPassBase &&) = delete;
ConvertIndexToSPIRVPassBase& operator=(ConvertIndexToSPIRVPassBase &&) = delete;
~ConvertIndexToSPIRVPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-index-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-index-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Lower the `index` dialect to the `spirv` dialect."; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertIndexToSPIRVPass");
}
::llvm::StringRef getName() const override { return "ConvertIndexToSPIRVPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<::mlir::spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertIndexToSPIRVPassBase<DerivedT>)
ConvertIndexToSPIRVPassBase(ConvertIndexToSPIRVPassOptions options) : ConvertIndexToSPIRVPassBase() {
use64bitIndex = std::move(options.use64bitIndex);
}
protected:
::mlir::Pass::Option<bool> use64bitIndex{*this, "use-64bit-index", ::llvm::cl::desc("Use 64-bit integers to convert index types"), ::llvm::cl::init(false)};
private:
friend std::unique_ptr<::mlir::Pass> createConvertIndexToSPIRVPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createConvertIndexToSPIRVPass(ConvertIndexToSPIRVPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createConvertIndexToSPIRVPass() {
return impl::createConvertIndexToSPIRVPass();
}
std::unique_ptr<::mlir::Pass> createConvertIndexToSPIRVPass(ConvertIndexToSPIRVPassOptions options) {
return impl::createConvertIndexToSPIRVPass(std::move(options));
}
#undef GEN_PASS_DEF_CONVERTINDEXTOSPIRVPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTLINALGTOSTANDARD
#undef GEN_PASS_DECL_CONVERTLINALGTOSTANDARD
#endif
#ifdef GEN_PASS_DEF_CONVERTLINALGTOSTANDARD
namespace impl {
template <typename DerivedT>
class ConvertLinalgToStandardBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertLinalgToStandardBase;
ConvertLinalgToStandardBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertLinalgToStandardBase(const ConvertLinalgToStandardBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertLinalgToStandardBase& operator=(const ConvertLinalgToStandardBase &) = delete;
ConvertLinalgToStandardBase(ConvertLinalgToStandardBase &&) = delete;
ConvertLinalgToStandardBase& operator=(ConvertLinalgToStandardBase &&) = delete;
~ConvertLinalgToStandardBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-linalg-to-std");
}
::llvm::StringRef getArgument() const override { return "convert-linalg-to-std"; }
::llvm::StringRef getDescription() const override { return "Convert the operations from the linalg dialect into the Standard dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertLinalgToStandard");
}
::llvm::StringRef getName() const override { return "ConvertLinalgToStandard"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<func::FuncDialect>();
registry.insert<memref::MemRefDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertLinalgToStandardBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTLINALGTOSTANDARD
#endif
#ifdef GEN_PASS_DECL_CONVERTMATHTOFUNCS
struct ConvertMathToFuncsOptions {
unsigned minWidthOfFPowIExponent = 1;
bool convertCtlz = false;
};
std::unique_ptr<::mlir::Pass> createConvertMathToFuncs();
std::unique_ptr<::mlir::Pass> createConvertMathToFuncs(ConvertMathToFuncsOptions options);
#undef GEN_PASS_DECL_CONVERTMATHTOFUNCS
#endif
#ifdef GEN_PASS_DEF_CONVERTMATHTOFUNCS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertMathToFuncs();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertMathToFuncs(ConvertMathToFuncsOptions options);
}
namespace impl {
template <typename DerivedT>
class ConvertMathToFuncsBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertMathToFuncsBase;
ConvertMathToFuncsBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMathToFuncsBase(const ConvertMathToFuncsBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertMathToFuncsBase& operator=(const ConvertMathToFuncsBase &) = delete;
ConvertMathToFuncsBase(ConvertMathToFuncsBase &&) = delete;
ConvertMathToFuncsBase& operator=(ConvertMathToFuncsBase &&) = delete;
~ConvertMathToFuncsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-math-to-funcs");
}
::llvm::StringRef getArgument() const override { return "convert-math-to-funcs"; }
::llvm::StringRef getDescription() const override { return "Convert Math operations to calls of outlined implementations."; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMathToFuncs");
}
::llvm::StringRef getName() const override { return "ConvertMathToFuncs"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
registry.insert<cf::ControlFlowDialect>();
registry.insert<func::FuncDialect>();
registry.insert<scf::SCFDialect>();
registry.insert<vector::VectorDialect>();
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMathToFuncsBase<DerivedT>)
ConvertMathToFuncsBase(ConvertMathToFuncsOptions options) : ConvertMathToFuncsBase() {
minWidthOfFPowIExponent = std::move(options.minWidthOfFPowIExponent);
convertCtlz = std::move(options.convertCtlz);
}
protected:
::mlir::Pass::Option<unsigned> minWidthOfFPowIExponent{*this, "min-width-of-fpowi-exponent", ::llvm::cl::desc("Convert FPowI only if the width of its exponent's integer type is greater than or equal to this value"), ::llvm::cl::init(1)};
::mlir::Pass::Option<bool> convertCtlz{*this, "convert-ctlz", ::llvm::cl::desc("Convert math.ctlz to a software implementation. Enable for targets that do not natively support ctlz."), ::llvm::cl::init(false)};
private:
friend std::unique_ptr<::mlir::Pass> createConvertMathToFuncs() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createConvertMathToFuncs(ConvertMathToFuncsOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createConvertMathToFuncs() {
return impl::createConvertMathToFuncs();
}
std::unique_ptr<::mlir::Pass> createConvertMathToFuncs(ConvertMathToFuncsOptions options) {
return impl::createConvertMathToFuncs(std::move(options));
}
#undef GEN_PASS_DEF_CONVERTMATHTOFUNCS
#endif
#ifdef GEN_PASS_DECL_CONVERTMATHTOLLVMPASS
struct ConvertMathToLLVMPassOptions {
bool approximateLog1p = true;
};
std::unique_ptr<::mlir::Pass> createConvertMathToLLVMPass();
std::unique_ptr<::mlir::Pass> createConvertMathToLLVMPass(ConvertMathToLLVMPassOptions options);
#undef GEN_PASS_DECL_CONVERTMATHTOLLVMPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTMATHTOLLVMPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertMathToLLVMPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertMathToLLVMPass(ConvertMathToLLVMPassOptions options);
}
namespace impl {
template <typename DerivedT>
class ConvertMathToLLVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertMathToLLVMPassBase;
ConvertMathToLLVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMathToLLVMPassBase(const ConvertMathToLLVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertMathToLLVMPassBase& operator=(const ConvertMathToLLVMPassBase &) = delete;
ConvertMathToLLVMPassBase(ConvertMathToLLVMPassBase &&) = delete;
ConvertMathToLLVMPassBase& operator=(ConvertMathToLLVMPassBase &&) = delete;
~ConvertMathToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-math-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-math-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert Math dialect to LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMathToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertMathToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMathToLLVMPassBase<DerivedT>)
ConvertMathToLLVMPassBase(ConvertMathToLLVMPassOptions options) : ConvertMathToLLVMPassBase() {
approximateLog1p = std::move(options.approximateLog1p);
}
protected:
::mlir::Pass::Option<bool> approximateLog1p{*this, "approximate-log1p", ::llvm::cl::desc("Enable approximation of Log1p."), ::llvm::cl::init(true)};
private:
friend std::unique_ptr<::mlir::Pass> createConvertMathToLLVMPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createConvertMathToLLVMPass(ConvertMathToLLVMPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createConvertMathToLLVMPass() {
return impl::createConvertMathToLLVMPass();
}
std::unique_ptr<::mlir::Pass> createConvertMathToLLVMPass(ConvertMathToLLVMPassOptions options) {
return impl::createConvertMathToLLVMPass(std::move(options));
}
#undef GEN_PASS_DEF_CONVERTMATHTOLLVMPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTMATHTOLIBM
#undef GEN_PASS_DECL_CONVERTMATHTOLIBM
#endif
#ifdef GEN_PASS_DEF_CONVERTMATHTOLIBM
namespace impl {
template <typename DerivedT>
class ConvertMathToLibmBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertMathToLibmBase;
ConvertMathToLibmBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMathToLibmBase(const ConvertMathToLibmBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertMathToLibmBase& operator=(const ConvertMathToLibmBase &) = delete;
ConvertMathToLibmBase(ConvertMathToLibmBase &&) = delete;
ConvertMathToLibmBase& operator=(ConvertMathToLibmBase &&) = delete;
~ConvertMathToLibmBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-math-to-libm");
}
::llvm::StringRef getArgument() const override { return "convert-math-to-libm"; }
::llvm::StringRef getDescription() const override { return "Convert Math dialect to libm calls"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMathToLibm");
}
::llvm::StringRef getName() const override { return "ConvertMathToLibm"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
registry.insert<func::FuncDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMathToLibmBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTMATHTOLIBM
#endif
#ifdef GEN_PASS_DECL_CONVERTMATHTOROCDL
std::unique_ptr<::mlir::Pass> createConvertMathToROCDL();
#undef GEN_PASS_DECL_CONVERTMATHTOROCDL
#endif
#ifdef GEN_PASS_DEF_CONVERTMATHTOROCDL
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertMathToROCDL();
}
namespace impl {
template <typename DerivedT>
class ConvertMathToROCDLBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertMathToROCDLBase;
ConvertMathToROCDLBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMathToROCDLBase(const ConvertMathToROCDLBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertMathToROCDLBase& operator=(const ConvertMathToROCDLBase &) = delete;
ConvertMathToROCDLBase(ConvertMathToROCDLBase &&) = delete;
ConvertMathToROCDLBase& operator=(ConvertMathToROCDLBase &&) = delete;
~ConvertMathToROCDLBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-math-to-rocdl");
}
::llvm::StringRef getArgument() const override { return "convert-math-to-rocdl"; }
::llvm::StringRef getDescription() const override { return "Convert Math dialect to ROCDL library calls"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMathToROCDL");
}
::llvm::StringRef getName() const override { return "ConvertMathToROCDL"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
registry.insert<func::FuncDialect>();
registry.insert<ROCDL::ROCDLDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMathToROCDLBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createConvertMathToROCDL() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createConvertMathToROCDL() {
return impl::createConvertMathToROCDL();
}
#undef GEN_PASS_DEF_CONVERTMATHTOROCDL
#endif
#ifdef GEN_PASS_DECL_CONVERTMATHTOSPIRV
#undef GEN_PASS_DECL_CONVERTMATHTOSPIRV
#endif
#ifdef GEN_PASS_DEF_CONVERTMATHTOSPIRV
namespace impl {
template <typename DerivedT>
class ConvertMathToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertMathToSPIRVBase;
ConvertMathToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMathToSPIRVBase(const ConvertMathToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertMathToSPIRVBase& operator=(const ConvertMathToSPIRVBase &) = delete;
ConvertMathToSPIRVBase(ConvertMathToSPIRVBase &&) = delete;
ConvertMathToSPIRVBase& operator=(ConvertMathToSPIRVBase &&) = delete;
~ConvertMathToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-math-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-math-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert Math dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMathToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertMathToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMathToSPIRVBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTMATHTOSPIRV
#endif
#ifdef GEN_PASS_DECL_CONVERTMEMREFTOEMITC
std::unique_ptr<::mlir::Pass> createConvertMemRefToEmitC();
#undef GEN_PASS_DECL_CONVERTMEMREFTOEMITC
#endif
#ifdef GEN_PASS_DEF_CONVERTMEMREFTOEMITC
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertMemRefToEmitC();
}
namespace impl {
template <typename DerivedT>
class ConvertMemRefToEmitCBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertMemRefToEmitCBase;
ConvertMemRefToEmitCBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMemRefToEmitCBase(const ConvertMemRefToEmitCBase &other) : ::mlir::OperationPass<>(other) {}
ConvertMemRefToEmitCBase& operator=(const ConvertMemRefToEmitCBase &) = delete;
ConvertMemRefToEmitCBase(ConvertMemRefToEmitCBase &&) = delete;
ConvertMemRefToEmitCBase& operator=(ConvertMemRefToEmitCBase &&) = delete;
~ConvertMemRefToEmitCBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-memref-to-emitc");
}
::llvm::StringRef getArgument() const override { return "convert-memref-to-emitc"; }
::llvm::StringRef getDescription() const override { return "Convert MemRef dialect to EmitC dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMemRefToEmitC");
}
::llvm::StringRef getName() const override { return "ConvertMemRefToEmitC"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<emitc::EmitCDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMemRefToEmitCBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createConvertMemRefToEmitC() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createConvertMemRefToEmitC() {
return impl::createConvertMemRefToEmitC();
}
#undef GEN_PASS_DEF_CONVERTMEMREFTOEMITC
#endif
#ifdef GEN_PASS_DECL_CONVERTMEMREFTOSPIRV
struct ConvertMemRefToSPIRVOptions {
int boolNumBits = 8;
bool use64bitIndex = false;
};
#undef GEN_PASS_DECL_CONVERTMEMREFTOSPIRV
#endif
#ifdef GEN_PASS_DEF_CONVERTMEMREFTOSPIRV
namespace impl {
template <typename DerivedT>
class ConvertMemRefToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertMemRefToSPIRVBase;
ConvertMemRefToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMemRefToSPIRVBase(const ConvertMemRefToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertMemRefToSPIRVBase& operator=(const ConvertMemRefToSPIRVBase &) = delete;
ConvertMemRefToSPIRVBase(ConvertMemRefToSPIRVBase &&) = delete;
ConvertMemRefToSPIRVBase& operator=(ConvertMemRefToSPIRVBase &&) = delete;
~ConvertMemRefToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-memref-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-memref-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert MemRef dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMemRefToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertMemRefToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMemRefToSPIRVBase<DerivedT>)
ConvertMemRefToSPIRVBase(ConvertMemRefToSPIRVOptions options) : ConvertMemRefToSPIRVBase() {
boolNumBits = std::move(options.boolNumBits);
use64bitIndex = std::move(options.use64bitIndex);
}
protected:
::mlir::Pass::Option<int> boolNumBits{*this, "bool-num-bits", ::llvm::cl::desc("The number of bits to store a boolean value"), ::llvm::cl::init(8)};
::mlir::Pass::Option<bool> use64bitIndex{*this, "use-64bit-index", ::llvm::cl::desc("Use 64-bit integers to convert index types"), ::llvm::cl::init(false)};
private:
};
}
#undef GEN_PASS_DEF_CONVERTMEMREFTOSPIRV
#endif
#ifdef GEN_PASS_DECL_CONVERTNVGPUTONVVMPASS
std::unique_ptr<::mlir::Pass> createConvertNVGPUToNVVMPass();
#undef GEN_PASS_DECL_CONVERTNVGPUTONVVMPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTNVGPUTONVVMPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertNVGPUToNVVMPass();
}
namespace impl {
template <typename DerivedT>
class ConvertNVGPUToNVVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertNVGPUToNVVMPassBase;
ConvertNVGPUToNVVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertNVGPUToNVVMPassBase(const ConvertNVGPUToNVVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertNVGPUToNVVMPassBase& operator=(const ConvertNVGPUToNVVMPassBase &) = delete;
ConvertNVGPUToNVVMPassBase(ConvertNVGPUToNVVMPassBase &&) = delete;
ConvertNVGPUToNVVMPassBase& operator=(ConvertNVGPUToNVVMPassBase &&) = delete;
~ConvertNVGPUToNVVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-nvgpu-to-nvvm");
}
::llvm::StringRef getArgument() const override { return "convert-nvgpu-to-nvvm"; }
::llvm::StringRef getDescription() const override { return "Convert NVGPU dialect to NVVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertNVGPUToNVVMPass");
}
::llvm::StringRef getName() const override { return "ConvertNVGPUToNVVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<NVVM::NVVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertNVGPUToNVVMPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createConvertNVGPUToNVVMPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createConvertNVGPUToNVVMPass() {
return impl::createConvertNVGPUToNVVMPass();
}
#undef GEN_PASS_DEF_CONVERTNVGPUTONVVMPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTNVVMTOLLVMPASS
std::unique_ptr<::mlir::Pass> createConvertNVVMToLLVMPass();
#undef GEN_PASS_DECL_CONVERTNVVMTOLLVMPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTNVVMTOLLVMPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertNVVMToLLVMPass();
}
namespace impl {
template <typename DerivedT>
class ConvertNVVMToLLVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertNVVMToLLVMPassBase;
ConvertNVVMToLLVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertNVVMToLLVMPassBase(const ConvertNVVMToLLVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertNVVMToLLVMPassBase& operator=(const ConvertNVVMToLLVMPassBase &) = delete;
ConvertNVVMToLLVMPassBase(ConvertNVVMToLLVMPassBase &&) = delete;
ConvertNVVMToLLVMPassBase& operator=(ConvertNVVMToLLVMPassBase &&) = delete;
~ConvertNVVMToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-nvvm-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-nvvm-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert NVVM to PTX with Inline Assembly in LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertNVVMToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertNVVMToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<NVVM::NVVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertNVVMToLLVMPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createConvertNVVMToLLVMPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createConvertNVVMToLLVMPass() {
return impl::createConvertNVVMToLLVMPass();
}
#undef GEN_PASS_DEF_CONVERTNVVMTOLLVMPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTOPENACCTOSCF
#undef GEN_PASS_DECL_CONVERTOPENACCTOSCF
#endif
#ifdef GEN_PASS_DEF_CONVERTOPENACCTOSCF
namespace impl {
template <typename DerivedT>
class ConvertOpenACCToSCFBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertOpenACCToSCFBase;
ConvertOpenACCToSCFBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertOpenACCToSCFBase(const ConvertOpenACCToSCFBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertOpenACCToSCFBase& operator=(const ConvertOpenACCToSCFBase &) = delete;
ConvertOpenACCToSCFBase(ConvertOpenACCToSCFBase &&) = delete;
ConvertOpenACCToSCFBase& operator=(ConvertOpenACCToSCFBase &&) = delete;
~ConvertOpenACCToSCFBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-openacc-to-scf");
}
::llvm::StringRef getArgument() const override { return "convert-openacc-to-scf"; }
::llvm::StringRef getDescription() const override { return "Convert the OpenACC ops to OpenACC with SCF dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertOpenACCToSCF");
}
::llvm::StringRef getName() const override { return "ConvertOpenACCToSCF"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<scf::SCFDialect>();
registry.insert<acc::OpenACCDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertOpenACCToSCFBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTOPENACCTOSCF
#endif
#ifdef GEN_PASS_DECL_CONVERTOPENMPTOLLVMPASS
std::unique_ptr<::mlir::Pass> createConvertOpenMPToLLVMPass();
#undef GEN_PASS_DECL_CONVERTOPENMPTOLLVMPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTOPENMPTOLLVMPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertOpenMPToLLVMPass();
}
namespace impl {
template <typename DerivedT>
class ConvertOpenMPToLLVMPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertOpenMPToLLVMPassBase;
ConvertOpenMPToLLVMPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertOpenMPToLLVMPassBase(const ConvertOpenMPToLLVMPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertOpenMPToLLVMPassBase& operator=(const ConvertOpenMPToLLVMPassBase &) = delete;
ConvertOpenMPToLLVMPassBase(ConvertOpenMPToLLVMPassBase &&) = delete;
ConvertOpenMPToLLVMPassBase& operator=(ConvertOpenMPToLLVMPassBase &&) = delete;
~ConvertOpenMPToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-openmp-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-openmp-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert the OpenMP ops to OpenMP ops with LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertOpenMPToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertOpenMPToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertOpenMPToLLVMPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createConvertOpenMPToLLVMPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createConvertOpenMPToLLVMPass() {
return impl::createConvertOpenMPToLLVMPass();
}
#undef GEN_PASS_DEF_CONVERTOPENMPTOLLVMPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTPDLTOPDLINTERP
#undef GEN_PASS_DECL_CONVERTPDLTOPDLINTERP
#endif
#ifdef GEN_PASS_DEF_CONVERTPDLTOPDLINTERP
namespace impl {
template <typename DerivedT>
class ConvertPDLToPDLInterpBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertPDLToPDLInterpBase;
ConvertPDLToPDLInterpBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertPDLToPDLInterpBase(const ConvertPDLToPDLInterpBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertPDLToPDLInterpBase& operator=(const ConvertPDLToPDLInterpBase &) = delete;
ConvertPDLToPDLInterpBase(ConvertPDLToPDLInterpBase &&) = delete;
ConvertPDLToPDLInterpBase& operator=(ConvertPDLToPDLInterpBase &&) = delete;
~ConvertPDLToPDLInterpBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-pdl-to-pdl-interp");
}
::llvm::StringRef getArgument() const override { return "convert-pdl-to-pdl-interp"; }
::llvm::StringRef getDescription() const override { return "Convert PDL ops to PDL interpreter ops"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertPDLToPDLInterp");
}
::llvm::StringRef getName() const override { return "ConvertPDLToPDLInterp"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<pdl_interp::PDLInterpDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertPDLToPDLInterpBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTPDLTOPDLINTERP
#endif
#ifdef GEN_PASS_DECL_CONVERTPARALLELLOOPTOGPU
#undef GEN_PASS_DECL_CONVERTPARALLELLOOPTOGPU
#endif
#ifdef GEN_PASS_DEF_CONVERTPARALLELLOOPTOGPU
namespace impl {
template <typename DerivedT>
class ConvertParallelLoopToGpuBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertParallelLoopToGpuBase;
ConvertParallelLoopToGpuBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertParallelLoopToGpuBase(const ConvertParallelLoopToGpuBase &other) : ::mlir::OperationPass<>(other) {}
ConvertParallelLoopToGpuBase& operator=(const ConvertParallelLoopToGpuBase &) = delete;
ConvertParallelLoopToGpuBase(ConvertParallelLoopToGpuBase &&) = delete;
ConvertParallelLoopToGpuBase& operator=(ConvertParallelLoopToGpuBase &&) = delete;
~ConvertParallelLoopToGpuBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-parallel-loops-to-gpu");
}
::llvm::StringRef getArgument() const override { return "convert-parallel-loops-to-gpu"; }
::llvm::StringRef getDescription() const override { return "Convert mapped scf.parallel ops to gpu launch operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertParallelLoopToGpu");
}
::llvm::StringRef getName() const override { return "ConvertParallelLoopToGpu"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<affine::AffineDialect>();
registry.insert<gpu::GPUDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertParallelLoopToGpuBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTPARALLELLOOPTOGPU
#endif
#ifdef GEN_PASS_DECL_CONVERTSCFTOOPENMPPASS
struct ConvertSCFToOpenMPPassOptions {
unsigned numThreads = 0;
};
std::unique_ptr<::mlir::Pass> createConvertSCFToOpenMPPass();
std::unique_ptr<::mlir::Pass> createConvertSCFToOpenMPPass(ConvertSCFToOpenMPPassOptions options);
#undef GEN_PASS_DECL_CONVERTSCFTOOPENMPPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTSCFTOOPENMPPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertSCFToOpenMPPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertSCFToOpenMPPass(ConvertSCFToOpenMPPassOptions options);
}
namespace impl {
template <typename DerivedT>
class ConvertSCFToOpenMPPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertSCFToOpenMPPassBase;
ConvertSCFToOpenMPPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertSCFToOpenMPPassBase(const ConvertSCFToOpenMPPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertSCFToOpenMPPassBase& operator=(const ConvertSCFToOpenMPPassBase &) = delete;
ConvertSCFToOpenMPPassBase(ConvertSCFToOpenMPPassBase &&) = delete;
ConvertSCFToOpenMPPassBase& operator=(ConvertSCFToOpenMPPassBase &&) = delete;
~ConvertSCFToOpenMPPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-scf-to-openmp");
}
::llvm::StringRef getArgument() const override { return "convert-scf-to-openmp"; }
::llvm::StringRef getDescription() const override { return "Convert SCF parallel loop to OpenMP parallel + workshare constructs."; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertSCFToOpenMPPass");
}
::llvm::StringRef getName() const override { return "ConvertSCFToOpenMPPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<omp::OpenMPDialect>();
registry.insert<LLVM::LLVMDialect>();
registry.insert<memref::MemRefDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertSCFToOpenMPPassBase<DerivedT>)
ConvertSCFToOpenMPPassBase(ConvertSCFToOpenMPPassOptions options) : ConvertSCFToOpenMPPassBase() {
numThreads = std::move(options.numThreads);
}
protected:
::mlir::Pass::Option<unsigned> numThreads{*this, "num-threads", ::llvm::cl::desc("Number of threads to use"), ::llvm::cl::init(0)};
private:
friend std::unique_ptr<::mlir::Pass> createConvertSCFToOpenMPPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createConvertSCFToOpenMPPass(ConvertSCFToOpenMPPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createConvertSCFToOpenMPPass() {
return impl::createConvertSCFToOpenMPPass();
}
std::unique_ptr<::mlir::Pass> createConvertSCFToOpenMPPass(ConvertSCFToOpenMPPassOptions options) {
return impl::createConvertSCFToOpenMPPass(std::move(options));
}
#undef GEN_PASS_DEF_CONVERTSCFTOOPENMPPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTSPIRVTOLLVMPASS
struct ConvertSPIRVToLLVMPassOptions {
::mlir::spirv::ClientAPI clientAPI = ::mlir::spirv::ClientAPI::Unknown;
};
std::unique_ptr<::mlir::Pass> createConvertSPIRVToLLVMPass();
std::unique_ptr<::mlir::Pass> createConvertSPIRVToLLVMPass(ConvertSPIRVToLLVMPassOptions options);
#undef GEN_PASS_DECL_CONVERTSPIRVTOLLVMPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTSPIRVTOLLVMPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertSPIRVToLLVMPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertSPIRVToLLVMPass(ConvertSPIRVToLLVMPassOptions options);
}
namespace impl {
template <typename DerivedT>
class ConvertSPIRVToLLVMPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertSPIRVToLLVMPassBase;
ConvertSPIRVToLLVMPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertSPIRVToLLVMPassBase(const ConvertSPIRVToLLVMPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertSPIRVToLLVMPassBase& operator=(const ConvertSPIRVToLLVMPassBase &) = delete;
ConvertSPIRVToLLVMPassBase(ConvertSPIRVToLLVMPassBase &&) = delete;
ConvertSPIRVToLLVMPassBase& operator=(ConvertSPIRVToLLVMPassBase &&) = delete;
~ConvertSPIRVToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-spirv-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-spirv-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert SPIR-V dialect to LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertSPIRVToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertSPIRVToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertSPIRVToLLVMPassBase<DerivedT>)
ConvertSPIRVToLLVMPassBase(ConvertSPIRVToLLVMPassOptions options) : ConvertSPIRVToLLVMPassBase() {
clientAPI = std::move(options.clientAPI);
}
protected:
::mlir::Pass::Option<::mlir::spirv::ClientAPI> clientAPI{*this, "client-api", ::llvm::cl::desc("Derive StorageClass to address space mapping from the client API"), ::llvm::cl::init(::mlir::spirv::ClientAPI::Unknown), ::llvm::cl::values(
clEnumValN(::mlir::spirv::ClientAPI::Unknown, "Unknown", "Unknown (default)"),
clEnumValN(::mlir::spirv::ClientAPI::Metal, "Metal", "Metal"),
clEnumValN(::mlir::spirv::ClientAPI::OpenCL, "OpenCL", "OpenCL"),
clEnumValN(::mlir::spirv::ClientAPI::Vulkan, "Vulkan", "Vulkan"),
clEnumValN(::mlir::spirv::ClientAPI::WebGPU, "WebGPU", "WebGPU")
)};
private:
friend std::unique_ptr<::mlir::Pass> createConvertSPIRVToLLVMPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createConvertSPIRVToLLVMPass(ConvertSPIRVToLLVMPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createConvertSPIRVToLLVMPass() {
return impl::createConvertSPIRVToLLVMPass();
}
std::unique_ptr<::mlir::Pass> createConvertSPIRVToLLVMPass(ConvertSPIRVToLLVMPassOptions options) {
return impl::createConvertSPIRVToLLVMPass(std::move(options));
}
#undef GEN_PASS_DEF_CONVERTSPIRVTOLLVMPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTSHAPECONSTRAINTS
#undef GEN_PASS_DECL_CONVERTSHAPECONSTRAINTS
#endif
#ifdef GEN_PASS_DEF_CONVERTSHAPECONSTRAINTS
namespace impl {
template <typename DerivedT>
class ConvertShapeConstraintsBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertShapeConstraintsBase;
ConvertShapeConstraintsBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertShapeConstraintsBase(const ConvertShapeConstraintsBase &other) : ::mlir::OperationPass<>(other) {}
ConvertShapeConstraintsBase& operator=(const ConvertShapeConstraintsBase &) = delete;
ConvertShapeConstraintsBase(ConvertShapeConstraintsBase &&) = delete;
ConvertShapeConstraintsBase& operator=(ConvertShapeConstraintsBase &&) = delete;
~ConvertShapeConstraintsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-shape-constraints");
}
::llvm::StringRef getArgument() const override { return "convert-shape-constraints"; }
::llvm::StringRef getDescription() const override { return "Convert shape constraint operations to the standard dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertShapeConstraints");
}
::llvm::StringRef getName() const override { return "ConvertShapeConstraints"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<cf::ControlFlowDialect>();
registry.insert<scf::SCFDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertShapeConstraintsBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTSHAPECONSTRAINTS
#endif
#ifdef GEN_PASS_DECL_CONVERTSHAPETOSTANDARD
#undef GEN_PASS_DECL_CONVERTSHAPETOSTANDARD
#endif
#ifdef GEN_PASS_DEF_CONVERTSHAPETOSTANDARD
namespace impl {
template <typename DerivedT>
class ConvertShapeToStandardBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertShapeToStandardBase;
ConvertShapeToStandardBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertShapeToStandardBase(const ConvertShapeToStandardBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertShapeToStandardBase& operator=(const ConvertShapeToStandardBase &) = delete;
ConvertShapeToStandardBase(ConvertShapeToStandardBase &&) = delete;
ConvertShapeToStandardBase& operator=(ConvertShapeToStandardBase &&) = delete;
~ConvertShapeToStandardBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-shape-to-std");
}
::llvm::StringRef getArgument() const override { return "convert-shape-to-std"; }
::llvm::StringRef getDescription() const override { return "Convert operations from the shape dialect into the standard dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertShapeToStandard");
}
::llvm::StringRef getName() const override { return "ConvertShapeToStandard"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<scf::SCFDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertShapeToStandardBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTSHAPETOSTANDARD
#endif
#ifdef GEN_PASS_DECL_CONVERTTENSORTOLINALG
#undef GEN_PASS_DECL_CONVERTTENSORTOLINALG
#endif
#ifdef GEN_PASS_DEF_CONVERTTENSORTOLINALG
namespace impl {
template <typename DerivedT>
class ConvertTensorToLinalgBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertTensorToLinalgBase;
ConvertTensorToLinalgBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertTensorToLinalgBase(const ConvertTensorToLinalgBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertTensorToLinalgBase& operator=(const ConvertTensorToLinalgBase &) = delete;
ConvertTensorToLinalgBase(ConvertTensorToLinalgBase &&) = delete;
ConvertTensorToLinalgBase& operator=(ConvertTensorToLinalgBase &&) = delete;
~ConvertTensorToLinalgBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-tensor-to-linalg");
}
::llvm::StringRef getArgument() const override { return "convert-tensor-to-linalg"; }
::llvm::StringRef getDescription() const override { return "Convert some Tensor dialect ops to Linalg dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertTensorToLinalg");
}
::llvm::StringRef getName() const override { return "ConvertTensorToLinalg"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
registry.insert<linalg::LinalgDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertTensorToLinalgBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTTENSORTOLINALG
#endif
#ifdef GEN_PASS_DECL_CONVERTTENSORTOSPIRV
struct ConvertTensorToSPIRVOptions {
bool emulateLT32BitScalarTypes = true;
};
#undef GEN_PASS_DECL_CONVERTTENSORTOSPIRV
#endif
#ifdef GEN_PASS_DEF_CONVERTTENSORTOSPIRV
namespace impl {
template <typename DerivedT>
class ConvertTensorToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertTensorToSPIRVBase;
ConvertTensorToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertTensorToSPIRVBase(const ConvertTensorToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertTensorToSPIRVBase& operator=(const ConvertTensorToSPIRVBase &) = delete;
ConvertTensorToSPIRVBase(ConvertTensorToSPIRVBase &&) = delete;
ConvertTensorToSPIRVBase& operator=(ConvertTensorToSPIRVBase &&) = delete;
~ConvertTensorToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-tensor-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-tensor-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert Tensor dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertTensorToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertTensorToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertTensorToSPIRVBase<DerivedT>)
ConvertTensorToSPIRVBase(ConvertTensorToSPIRVOptions options) : ConvertTensorToSPIRVBase() {
emulateLT32BitScalarTypes = std::move(options.emulateLT32BitScalarTypes);
}
protected:
::mlir::Pass::Option<bool> emulateLT32BitScalarTypes{*this, "emulate-lt-32-bit-scalar-types", ::llvm::cl::desc("Emulate narrower scalar types with 32-bit ones if not supported by the target"), ::llvm::cl::init(true)};
private:
};
}
#undef GEN_PASS_DEF_CONVERTTENSORTOSPIRV
#endif
#ifdef GEN_PASS_DECL_CONVERTTOLLVMPASS
struct ConvertToLLVMPassOptions {
::llvm::SmallVector<std::string> filterDialects;
};
#undef GEN_PASS_DECL_CONVERTTOLLVMPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTTOLLVMPASS
namespace impl {
template <typename DerivedT>
class ConvertToLLVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertToLLVMPassBase;
ConvertToLLVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertToLLVMPassBase(const ConvertToLLVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertToLLVMPassBase& operator=(const ConvertToLLVMPassBase &) = delete;
ConvertToLLVMPassBase(ConvertToLLVMPassBase &&) = delete;
ConvertToLLVMPassBase& operator=(ConvertToLLVMPassBase &&) = delete;
~ConvertToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert to LLVM via dialect interfaces found in the input IR"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertToLLVMPassBase<DerivedT>)
ConvertToLLVMPassBase(ConvertToLLVMPassOptions options) : ConvertToLLVMPassBase() {
filterDialects = std::move(options.filterDialects);
}
protected:
::mlir::Pass::ListOption<std::string> filterDialects{*this, "filter-dialects", ::llvm::cl::desc("Test conversion patterns of only the specified dialects")};
private:
};
}
#undef GEN_PASS_DEF_CONVERTTOLLVMPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTTOSPIRVPASS
struct ConvertToSPIRVPassOptions {
bool runSignatureConversion = true;
bool runVectorUnrolling = true;
bool convertGPUModules = false;
};
std::unique_ptr<::mlir::Pass> createConvertToSPIRVPass();
std::unique_ptr<::mlir::Pass> createConvertToSPIRVPass(ConvertToSPIRVPassOptions options);
#undef GEN_PASS_DECL_CONVERTTOSPIRVPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTTOSPIRVPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertToSPIRVPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertToSPIRVPass(ConvertToSPIRVPassOptions options);
}
namespace impl {
template <typename DerivedT>
class ConvertToSPIRVPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertToSPIRVPassBase;
ConvertToSPIRVPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertToSPIRVPassBase(const ConvertToSPIRVPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertToSPIRVPassBase& operator=(const ConvertToSPIRVPassBase &) = delete;
ConvertToSPIRVPassBase(ConvertToSPIRVPassBase &&) = delete;
ConvertToSPIRVPassBase& operator=(ConvertToSPIRVPassBase &&) = delete;
~ConvertToSPIRVPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert to SPIR-V"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertToSPIRVPass");
}
::llvm::StringRef getName() const override { return "ConvertToSPIRVPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertToSPIRVPassBase<DerivedT>)
ConvertToSPIRVPassBase(ConvertToSPIRVPassOptions options) : ConvertToSPIRVPassBase() {
runSignatureConversion = std::move(options.runSignatureConversion);
runVectorUnrolling = std::move(options.runVectorUnrolling);
convertGPUModules = std::move(options.convertGPUModules);
}
protected:
::mlir::Pass::Option<bool> runSignatureConversion{*this, "run-signature-conversion", ::llvm::cl::desc("Run function signature conversion to convert vector types"), ::llvm::cl::init(true)};
::mlir::Pass::Option<bool> runVectorUnrolling{*this, "run-vector-unrolling", ::llvm::cl::desc("Run vector unrolling to convert vector types in function bodies"), ::llvm::cl::init(true)};
::mlir::Pass::Option<bool> convertGPUModules{*this, "convert-gpu-modules", ::llvm::cl::desc("Clone and convert GPU modules"), ::llvm::cl::init(false)};
private:
friend std::unique_ptr<::mlir::Pass> createConvertToSPIRVPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createConvertToSPIRVPass(ConvertToSPIRVPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createConvertToSPIRVPass() {
return impl::createConvertToSPIRVPass();
}
std::unique_ptr<::mlir::Pass> createConvertToSPIRVPass(ConvertToSPIRVPassOptions options) {
return impl::createConvertToSPIRVPass(std::move(options));
}
#undef GEN_PASS_DEF_CONVERTTOSPIRVPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTVECTORTOARMSME
#undef GEN_PASS_DECL_CONVERTVECTORTOARMSME
#endif
#ifdef GEN_PASS_DEF_CONVERTVECTORTOARMSME
namespace impl {
template <typename DerivedT>
class ConvertVectorToArmSMEBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertVectorToArmSMEBase;
ConvertVectorToArmSMEBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVectorToArmSMEBase(const ConvertVectorToArmSMEBase &other) : ::mlir::OperationPass<>(other) {}
ConvertVectorToArmSMEBase& operator=(const ConvertVectorToArmSMEBase &) = delete;
ConvertVectorToArmSMEBase(ConvertVectorToArmSMEBase &&) = delete;
ConvertVectorToArmSMEBase& operator=(ConvertVectorToArmSMEBase &&) = delete;
~ConvertVectorToArmSMEBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-vector-to-arm-sme");
}
::llvm::StringRef getArgument() const override { return "convert-vector-to-arm-sme"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the vector dialect into the ArmSME dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVectorToArmSME");
}
::llvm::StringRef getName() const override { return "ConvertVectorToArmSME"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arm_sme::ArmSMEDialect>();
registry.insert<arm_sve::ArmSVEDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVectorToArmSMEBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTVECTORTOARMSME
#endif
#ifdef GEN_PASS_DECL_CONVERTVECTORTOGPU
struct ConvertVectorToGPUOptions {
bool useNvGpu = false;
};
#undef GEN_PASS_DECL_CONVERTVECTORTOGPU
#endif
#ifdef GEN_PASS_DEF_CONVERTVECTORTOGPU
namespace impl {
template <typename DerivedT>
class ConvertVectorToGPUBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertVectorToGPUBase;
ConvertVectorToGPUBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVectorToGPUBase(const ConvertVectorToGPUBase &other) : ::mlir::OperationPass<>(other) {}
ConvertVectorToGPUBase& operator=(const ConvertVectorToGPUBase &) = delete;
ConvertVectorToGPUBase(ConvertVectorToGPUBase &&) = delete;
ConvertVectorToGPUBase& operator=(ConvertVectorToGPUBase &&) = delete;
~ConvertVectorToGPUBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-vector-to-gpu");
}
::llvm::StringRef getArgument() const override { return "convert-vector-to-gpu"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the vector dialect into the GPU dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVectorToGPU");
}
::llvm::StringRef getName() const override { return "ConvertVectorToGPU"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<memref::MemRefDialect>();
registry.insert<gpu::GPUDialect>();
registry.insert<affine::AffineDialect>();
registry.insert<vector::VectorDialect>();
registry.insert<nvgpu::NVGPUDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVectorToGPUBase<DerivedT>)
ConvertVectorToGPUBase(ConvertVectorToGPUOptions options) : ConvertVectorToGPUBase() {
useNvGpu = std::move(options.useNvGpu);
}
protected:
::mlir::Pass::Option<bool> useNvGpu{*this, "use-nvgpu", ::llvm::cl::desc("convert to NvGPU ops instead of GPU dialect ops"), ::llvm::cl::init(false)};
private:
};
}
#undef GEN_PASS_DEF_CONVERTVECTORTOGPU
#endif
#ifdef GEN_PASS_DECL_CONVERTVECTORTOLLVMPASS
struct ConvertVectorToLLVMPassOptions {
bool reassociateFPReductions = false;
bool force32BitVectorIndices = true;
bool amx = false;
bool armNeon = false;
bool armSVE = false;
bool x86Vector = false;
};
std::unique_ptr<::mlir::Pass> createConvertVectorToLLVMPass();
std::unique_ptr<::mlir::Pass> createConvertVectorToLLVMPass(ConvertVectorToLLVMPassOptions options);
#undef GEN_PASS_DECL_CONVERTVECTORTOLLVMPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTVECTORTOLLVMPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertVectorToLLVMPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertVectorToLLVMPass(ConvertVectorToLLVMPassOptions options);
}
namespace impl {
template <typename DerivedT>
class ConvertVectorToLLVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertVectorToLLVMPassBase;
ConvertVectorToLLVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVectorToLLVMPassBase(const ConvertVectorToLLVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertVectorToLLVMPassBase& operator=(const ConvertVectorToLLVMPassBase &) = delete;
ConvertVectorToLLVMPassBase(ConvertVectorToLLVMPassBase &&) = delete;
ConvertVectorToLLVMPassBase& operator=(ConvertVectorToLLVMPassBase &&) = delete;
~ConvertVectorToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-vector-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-vector-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the vector dialect into the LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVectorToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertVectorToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVectorToLLVMPassBase<DerivedT>)
ConvertVectorToLLVMPassBase(ConvertVectorToLLVMPassOptions options) : ConvertVectorToLLVMPassBase() {
reassociateFPReductions = std::move(options.reassociateFPReductions);
force32BitVectorIndices = std::move(options.force32BitVectorIndices);
amx = std::move(options.amx);
armNeon = std::move(options.armNeon);
armSVE = std::move(options.armSVE);
x86Vector = std::move(options.x86Vector);
}
protected:
::mlir::Pass::Option<bool> reassociateFPReductions{*this, "reassociate-fp-reductions", ::llvm::cl::desc("Allows llvm to reassociate floating-point reductions for speed"), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> force32BitVectorIndices{*this, "force-32bit-vector-indices", ::llvm::cl::desc("Allows compiler to assume vector indices fit in 32-bit if that yields faster code"), ::llvm::cl::init(true)};
::mlir::Pass::Option<bool> amx{*this, "enable-amx", ::llvm::cl::desc("Enables the use of AMX dialect while lowering the vector dialect."), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> armNeon{*this, "enable-arm-neon", ::llvm::cl::desc("Enables the use of ArmNeon dialect while lowering the vector dialect."), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> armSVE{*this, "enable-arm-sve", ::llvm::cl::desc("Enables the use of ArmSVE dialect while lowering the vector dialect."), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> x86Vector{*this, "enable-x86vector", ::llvm::cl::desc("Enables the use of X86Vector dialect while lowering the vector dialect."), ::llvm::cl::init(false)};
private:
friend std::unique_ptr<::mlir::Pass> createConvertVectorToLLVMPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createConvertVectorToLLVMPass(ConvertVectorToLLVMPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createConvertVectorToLLVMPass() {
return impl::createConvertVectorToLLVMPass();
}
std::unique_ptr<::mlir::Pass> createConvertVectorToLLVMPass(ConvertVectorToLLVMPassOptions options) {
return impl::createConvertVectorToLLVMPass(std::move(options));
}
#undef GEN_PASS_DEF_CONVERTVECTORTOLLVMPASS
#endif
#ifdef GEN_PASS_DECL_CONVERTVECTORTOSCF
struct ConvertVectorToSCFOptions {
bool fullUnroll = false;
unsigned targetRank = 1;
bool lowerTensors = false;
bool lowerScalable = false;
};
#undef GEN_PASS_DECL_CONVERTVECTORTOSCF
#endif
#ifdef GEN_PASS_DEF_CONVERTVECTORTOSCF
namespace impl {
template <typename DerivedT>
class ConvertVectorToSCFBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertVectorToSCFBase;
ConvertVectorToSCFBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVectorToSCFBase(const ConvertVectorToSCFBase &other) : ::mlir::OperationPass<>(other) {}
ConvertVectorToSCFBase& operator=(const ConvertVectorToSCFBase &) = delete;
ConvertVectorToSCFBase(ConvertVectorToSCFBase &&) = delete;
ConvertVectorToSCFBase& operator=(ConvertVectorToSCFBase &&) = delete;
~ConvertVectorToSCFBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-vector-to-scf");
}
::llvm::StringRef getArgument() const override { return "convert-vector-to-scf"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the vector dialect into the SCF dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVectorToSCF");
}
::llvm::StringRef getName() const override { return "ConvertVectorToSCF"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<affine::AffineDialect>();
registry.insert<memref::MemRefDialect>();
registry.insert<scf::SCFDialect>();
registry.insert<tensor::TensorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVectorToSCFBase<DerivedT>)
ConvertVectorToSCFBase(ConvertVectorToSCFOptions options) : ConvertVectorToSCFBase() {
fullUnroll = std::move(options.fullUnroll);
targetRank = std::move(options.targetRank);
lowerTensors = std::move(options.lowerTensors);
lowerScalable = std::move(options.lowerScalable);
}
protected:
::mlir::Pass::Option<bool> fullUnroll{*this, "full-unroll", ::llvm::cl::desc("Perform full unrolling when converting vector transfers to SCF"), ::llvm::cl::init(false)};
::mlir::Pass::Option<unsigned> targetRank{*this, "target-rank", ::llvm::cl::desc("Target vector rank to which transfer ops should be lowered"), ::llvm::cl::init(1)};
::mlir::Pass::Option<bool> lowerTensors{*this, "lower-tensors", ::llvm::cl::desc("Lower transfer ops that operate on tensors"), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> lowerScalable{*this, "lower-scalable", ::llvm::cl::desc("Add scalable vector specific lowerings (that introduce loops)"), ::llvm::cl::init(false)};
private:
};
}
#undef GEN_PASS_DEF_CONVERTVECTORTOSCF
#endif
#ifdef GEN_PASS_DECL_CONVERTVECTORTOSPIRV
#undef GEN_PASS_DECL_CONVERTVECTORTOSPIRV
#endif
#ifdef GEN_PASS_DEF_CONVERTVECTORTOSPIRV
namespace impl {
template <typename DerivedT>
class ConvertVectorToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertVectorToSPIRVBase;
ConvertVectorToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVectorToSPIRVBase(const ConvertVectorToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertVectorToSPIRVBase& operator=(const ConvertVectorToSPIRVBase &) = delete;
ConvertVectorToSPIRVBase(ConvertVectorToSPIRVBase &&) = delete;
ConvertVectorToSPIRVBase& operator=(ConvertVectorToSPIRVBase &&) = delete;
~ConvertVectorToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-vector-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-vector-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert Vector dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVectorToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertVectorToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVectorToSPIRVBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTVECTORTOSPIRV
#endif
#ifdef GEN_PASS_DECL_CONVERTVECTORTOXEGPU
#undef GEN_PASS_DECL_CONVERTVECTORTOXEGPU
#endif
#ifdef GEN_PASS_DEF_CONVERTVECTORTOXEGPU
namespace impl {
template <typename DerivedT>
class ConvertVectorToXeGPUBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertVectorToXeGPUBase;
ConvertVectorToXeGPUBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVectorToXeGPUBase(const ConvertVectorToXeGPUBase &other) : ::mlir::OperationPass<>(other) {}
ConvertVectorToXeGPUBase& operator=(const ConvertVectorToXeGPUBase &) = delete;
ConvertVectorToXeGPUBase(ConvertVectorToXeGPUBase &&) = delete;
ConvertVectorToXeGPUBase& operator=(ConvertVectorToXeGPUBase &&) = delete;
~ConvertVectorToXeGPUBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-vector-to-xegpu");
}
::llvm::StringRef getArgument() const override { return "convert-vector-to-xegpu"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the vector dialect into the XeGPU dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVectorToXeGPU");
}
::llvm::StringRef getName() const override { return "ConvertVectorToXeGPU"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<memref::MemRefDialect>();
registry.insert<arith::ArithDialect>();
registry.insert<vector::VectorDialect>();
registry.insert<xegpu::XeGPUDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVectorToXeGPUBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_CONVERTVECTORTOXEGPU
#endif
#ifdef GEN_PASS_DECL_CONVERTVULKANLAUNCHFUNCTOVULKANCALLSPASS
std::unique_ptr<::mlir::Pass> createConvertVulkanLaunchFuncToVulkanCallsPass();
#undef GEN_PASS_DECL_CONVERTVULKANLAUNCHFUNCTOVULKANCALLSPASS
#endif
#ifdef GEN_PASS_DEF_CONVERTVULKANLAUNCHFUNCTOVULKANCALLSPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createConvertVulkanLaunchFuncToVulkanCallsPass();
}
namespace impl {
template <typename DerivedT>
class ConvertVulkanLaunchFuncToVulkanCallsPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertVulkanLaunchFuncToVulkanCallsPassBase;
ConvertVulkanLaunchFuncToVulkanCallsPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVulkanLaunchFuncToVulkanCallsPassBase(const ConvertVulkanLaunchFuncToVulkanCallsPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertVulkanLaunchFuncToVulkanCallsPassBase& operator=(const ConvertVulkanLaunchFuncToVulkanCallsPassBase &) = delete;
ConvertVulkanLaunchFuncToVulkanCallsPassBase(ConvertVulkanLaunchFuncToVulkanCallsPassBase &&) = delete;
ConvertVulkanLaunchFuncToVulkanCallsPassBase& operator=(ConvertVulkanLaunchFuncToVulkanCallsPassBase &&) = delete;
~ConvertVulkanLaunchFuncToVulkanCallsPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("launch-func-to-vulkan");
}
::llvm::StringRef getArgument() const override { return "launch-func-to-vulkan"; }
::llvm::StringRef getDescription() const override { return "Convert vulkanLaunch external call to Vulkan runtime external calls"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVulkanLaunchFuncToVulkanCallsPass");
}
::llvm::StringRef getName() const override { return "ConvertVulkanLaunchFuncToVulkanCallsPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVulkanLaunchFuncToVulkanCallsPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createConvertVulkanLaunchFuncToVulkanCallsPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createConvertVulkanLaunchFuncToVulkanCallsPass() {
return impl::createConvertVulkanLaunchFuncToVulkanCallsPass();
}
#undef GEN_PASS_DEF_CONVERTVULKANLAUNCHFUNCTOVULKANCALLSPASS
#endif
#ifdef GEN_PASS_DECL_FINALIZEMEMREFTOLLVMCONVERSIONPASS
struct FinalizeMemRefToLLVMConversionPassOptions {
bool useAlignedAlloc = false;
unsigned indexBitwidth = 0;
bool useGenericFunctions = false;
};
std::unique_ptr<::mlir::Pass> createFinalizeMemRefToLLVMConversionPass();
std::unique_ptr<::mlir::Pass> createFinalizeMemRefToLLVMConversionPass(FinalizeMemRefToLLVMConversionPassOptions options);
#undef GEN_PASS_DECL_FINALIZEMEMREFTOLLVMCONVERSIONPASS
#endif
#ifdef GEN_PASS_DEF_FINALIZEMEMREFTOLLVMCONVERSIONPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createFinalizeMemRefToLLVMConversionPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createFinalizeMemRefToLLVMConversionPass(FinalizeMemRefToLLVMConversionPassOptions options);
}
namespace impl {
template <typename DerivedT>
class FinalizeMemRefToLLVMConversionPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = FinalizeMemRefToLLVMConversionPassBase;
FinalizeMemRefToLLVMConversionPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
FinalizeMemRefToLLVMConversionPassBase(const FinalizeMemRefToLLVMConversionPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
FinalizeMemRefToLLVMConversionPassBase& operator=(const FinalizeMemRefToLLVMConversionPassBase &) = delete;
FinalizeMemRefToLLVMConversionPassBase(FinalizeMemRefToLLVMConversionPassBase &&) = delete;
FinalizeMemRefToLLVMConversionPassBase& operator=(FinalizeMemRefToLLVMConversionPassBase &&) = delete;
~FinalizeMemRefToLLVMConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("finalize-memref-to-llvm");
}
::llvm::StringRef getArgument() const override { return "finalize-memref-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Finalize MemRef dialect to LLVM dialect conversion"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("FinalizeMemRefToLLVMConversionPass");
}
::llvm::StringRef getName() const override { return "FinalizeMemRefToLLVMConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(FinalizeMemRefToLLVMConversionPassBase<DerivedT>)
FinalizeMemRefToLLVMConversionPassBase(FinalizeMemRefToLLVMConversionPassOptions options) : FinalizeMemRefToLLVMConversionPassBase() {
useAlignedAlloc = std::move(options.useAlignedAlloc);
indexBitwidth = std::move(options.indexBitwidth);
useGenericFunctions = std::move(options.useGenericFunctions);
}
protected:
::mlir::Pass::Option<bool> useAlignedAlloc{*this, "use-aligned-alloc", ::llvm::cl::desc("Use aligned_alloc in place of malloc for heap allocations"), ::llvm::cl::init(false)};
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
::mlir::Pass::Option<bool> useGenericFunctions{*this, "use-generic-functions", ::llvm::cl::desc("Use generic allocation and deallocation functions instead of the classic 'malloc', 'aligned_alloc' and 'free' functions"), ::llvm::cl::init(false)};
private:
friend std::unique_ptr<::mlir::Pass> createFinalizeMemRefToLLVMConversionPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createFinalizeMemRefToLLVMConversionPass(FinalizeMemRefToLLVMConversionPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createFinalizeMemRefToLLVMConversionPass() {
return impl::createFinalizeMemRefToLLVMConversionPass();
}
std::unique_ptr<::mlir::Pass> createFinalizeMemRefToLLVMConversionPass(FinalizeMemRefToLLVMConversionPassOptions options) {
return impl::createFinalizeMemRefToLLVMConversionPass(std::move(options));
}
#undef GEN_PASS_DEF_FINALIZEMEMREFTOLLVMCONVERSIONPASS
#endif
#ifdef GEN_PASS_DECL_GPUTOLLVMCONVERSIONPASS
struct GpuToLLVMConversionPassOptions {
bool hostBarePtrCallConv = false;
bool kernelBarePtrCallConv = false;
};
std::unique_ptr<::mlir::Pass> createGpuToLLVMConversionPass();
std::unique_ptr<::mlir::Pass> createGpuToLLVMConversionPass(GpuToLLVMConversionPassOptions options);
#undef GEN_PASS_DECL_GPUTOLLVMCONVERSIONPASS
#endif
#ifdef GEN_PASS_DEF_GPUTOLLVMCONVERSIONPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createGpuToLLVMConversionPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createGpuToLLVMConversionPass(GpuToLLVMConversionPassOptions options);
}
namespace impl {
template <typename DerivedT>
class GpuToLLVMConversionPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = GpuToLLVMConversionPassBase;
GpuToLLVMConversionPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
GpuToLLVMConversionPassBase(const GpuToLLVMConversionPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
GpuToLLVMConversionPassBase& operator=(const GpuToLLVMConversionPassBase &) = delete;
GpuToLLVMConversionPassBase(GpuToLLVMConversionPassBase &&) = delete;
GpuToLLVMConversionPassBase& operator=(GpuToLLVMConversionPassBase &&) = delete;
~GpuToLLVMConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("gpu-to-llvm");
}
::llvm::StringRef getArgument() const override { return "gpu-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert GPU dialect to LLVM dialect with GPU runtime calls"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("GpuToLLVMConversionPass");
}
::llvm::StringRef getName() const override { return "GpuToLLVMConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
registry.insert<memref::MemRefDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(GpuToLLVMConversionPassBase<DerivedT>)
GpuToLLVMConversionPassBase(GpuToLLVMConversionPassOptions options) : GpuToLLVMConversionPassBase() {
hostBarePtrCallConv = std::move(options.hostBarePtrCallConv);
kernelBarePtrCallConv = std::move(options.kernelBarePtrCallConv);
}
protected:
::mlir::Pass::Option<bool> hostBarePtrCallConv{*this, "use-bare-pointers-for-host", ::llvm::cl::desc("Use bare pointers to pass memref arguments to host functions. All memrefs must have static shape."), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> kernelBarePtrCallConv{*this, "use-bare-pointers-for-kernels", ::llvm::cl::desc("Use bare pointers to pass memref arguments to kernels. The kernel must use the same setting for this option."), ::llvm::cl::init(false)};
private:
friend std::unique_ptr<::mlir::Pass> createGpuToLLVMConversionPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createGpuToLLVMConversionPass(GpuToLLVMConversionPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createGpuToLLVMConversionPass() {
return impl::createGpuToLLVMConversionPass();
}
std::unique_ptr<::mlir::Pass> createGpuToLLVMConversionPass(GpuToLLVMConversionPassOptions options) {
return impl::createGpuToLLVMConversionPass(std::move(options));
}
#undef GEN_PASS_DEF_GPUTOLLVMCONVERSIONPASS
#endif
#ifdef GEN_PASS_DECL_LIFTCONTROLFLOWTOSCFPASS
std::unique_ptr<::mlir::Pass> createLiftControlFlowToSCFPass();
#undef GEN_PASS_DECL_LIFTCONTROLFLOWTOSCFPASS
#endif
#ifdef GEN_PASS_DEF_LIFTCONTROLFLOWTOSCFPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createLiftControlFlowToSCFPass();
}
namespace impl {
template <typename DerivedT>
class LiftControlFlowToSCFPassBase : public ::mlir::OperationPass<> {
public:
using Base = LiftControlFlowToSCFPassBase;
LiftControlFlowToSCFPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
LiftControlFlowToSCFPassBase(const LiftControlFlowToSCFPassBase &other) : ::mlir::OperationPass<>(other) {}
LiftControlFlowToSCFPassBase& operator=(const LiftControlFlowToSCFPassBase &) = delete;
LiftControlFlowToSCFPassBase(LiftControlFlowToSCFPassBase &&) = delete;
LiftControlFlowToSCFPassBase& operator=(LiftControlFlowToSCFPassBase &&) = delete;
~LiftControlFlowToSCFPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("lift-cf-to-scf");
}
::llvm::StringRef getArgument() const override { return "lift-cf-to-scf"; }
::llvm::StringRef getDescription() const override { return "Lift ControlFlow dialect to SCF dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("LiftControlFlowToSCFPass");
}
::llvm::StringRef getName() const override { return "LiftControlFlowToSCFPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<scf::SCFDialect>();
registry.insert<arith::ArithDialect>();
registry.insert<ub::UBDialect>();
registry.insert<func::FuncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(LiftControlFlowToSCFPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createLiftControlFlowToSCFPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createLiftControlFlowToSCFPass() {
return impl::createLiftControlFlowToSCFPass();
}
#undef GEN_PASS_DEF_LIFTCONTROLFLOWTOSCFPASS
#endif
#ifdef GEN_PASS_DECL_LOWERHOSTCODETOLLVMPASS
std::unique_ptr<::mlir::Pass> createLowerHostCodeToLLVMPass();
#undef GEN_PASS_DECL_LOWERHOSTCODETOLLVMPASS
#endif
#ifdef GEN_PASS_DEF_LOWERHOSTCODETOLLVMPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createLowerHostCodeToLLVMPass();
}
namespace impl {
template <typename DerivedT>
class LowerHostCodeToLLVMPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = LowerHostCodeToLLVMPassBase;
LowerHostCodeToLLVMPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
LowerHostCodeToLLVMPassBase(const LowerHostCodeToLLVMPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
LowerHostCodeToLLVMPassBase& operator=(const LowerHostCodeToLLVMPassBase &) = delete;
LowerHostCodeToLLVMPassBase(LowerHostCodeToLLVMPassBase &&) = delete;
LowerHostCodeToLLVMPassBase& operator=(LowerHostCodeToLLVMPassBase &&) = delete;
~LowerHostCodeToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("lower-host-to-llvm");
}
::llvm::StringRef getArgument() const override { return "lower-host-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Lowers the host module code and `gpu.launch_func` to LLVM"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("LowerHostCodeToLLVMPass");
}
::llvm::StringRef getName() const override { return "LowerHostCodeToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(LowerHostCodeToLLVMPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createLowerHostCodeToLLVMPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createLowerHostCodeToLLVMPass() {
return impl::createLowerHostCodeToLLVMPass();
}
#undef GEN_PASS_DEF_LOWERHOSTCODETOLLVMPASS
#endif
#ifdef GEN_PASS_DECL_MAPMEMREFSTORAGECLASS
struct MapMemRefStorageClassOptions {
std::string clientAPI = "vulkan";
};
#undef GEN_PASS_DECL_MAPMEMREFSTORAGECLASS
#endif
#ifdef GEN_PASS_DEF_MAPMEMREFSTORAGECLASS
namespace impl {
template <typename DerivedT>
class MapMemRefStorageClassBase : public ::mlir::OperationPass<> {
public:
using Base = MapMemRefStorageClassBase;
MapMemRefStorageClassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
MapMemRefStorageClassBase(const MapMemRefStorageClassBase &other) : ::mlir::OperationPass<>(other) {}
MapMemRefStorageClassBase& operator=(const MapMemRefStorageClassBase &) = delete;
MapMemRefStorageClassBase(MapMemRefStorageClassBase &&) = delete;
MapMemRefStorageClassBase& operator=(MapMemRefStorageClassBase &&) = delete;
~MapMemRefStorageClassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("map-memref-spirv-storage-class");
}
::llvm::StringRef getArgument() const override { return "map-memref-spirv-storage-class"; }
::llvm::StringRef getDescription() const override { return "Map numeric MemRef memory spaces to SPIR-V storage classes"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("MapMemRefStorageClass");
}
::llvm::StringRef getName() const override { return "MapMemRefStorageClass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(MapMemRefStorageClassBase<DerivedT>)
MapMemRefStorageClassBase(MapMemRefStorageClassOptions options) : MapMemRefStorageClassBase() {
clientAPI = std::move(options.clientAPI);
}
protected:
::mlir::Pass::Option<std::string> clientAPI{*this, "client-api", ::llvm::cl::desc("The client API to use for populating mappings"), ::llvm::cl::init("vulkan")};
private:
};
}
#undef GEN_PASS_DEF_MAPMEMREFSTORAGECLASS
#endif
#ifdef GEN_PASS_DECL_RECONCILEUNREALIZEDCASTS
#undef GEN_PASS_DECL_RECONCILEUNREALIZEDCASTS
#endif
#ifdef GEN_PASS_DEF_RECONCILEUNREALIZEDCASTS
namespace impl {
template <typename DerivedT>
class ReconcileUnrealizedCastsBase : public ::mlir::OperationPass<> {
public:
using Base = ReconcileUnrealizedCastsBase;
ReconcileUnrealizedCastsBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ReconcileUnrealizedCastsBase(const ReconcileUnrealizedCastsBase &other) : ::mlir::OperationPass<>(other) {}
ReconcileUnrealizedCastsBase& operator=(const ReconcileUnrealizedCastsBase &) = delete;
ReconcileUnrealizedCastsBase(ReconcileUnrealizedCastsBase &&) = delete;
ReconcileUnrealizedCastsBase& operator=(ReconcileUnrealizedCastsBase &&) = delete;
~ReconcileUnrealizedCastsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("reconcile-unrealized-casts");
}
::llvm::StringRef getArgument() const override { return "reconcile-unrealized-casts"; }
::llvm::StringRef getDescription() const override { return "Simplify and eliminate unrealized conversion casts"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ReconcileUnrealizedCasts");
}
::llvm::StringRef getName() const override { return "ReconcileUnrealizedCasts"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ReconcileUnrealizedCastsBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_RECONCILEUNREALIZEDCASTS
#endif
#ifdef GEN_PASS_DECL_SCFTOCONTROLFLOW
#undef GEN_PASS_DECL_SCFTOCONTROLFLOW
#endif
#ifdef GEN_PASS_DEF_SCFTOCONTROLFLOW
namespace impl {
template <typename DerivedT>
class SCFToControlFlowBase : public ::mlir::OperationPass<> {
public:
using Base = SCFToControlFlowBase;
SCFToControlFlowBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
SCFToControlFlowBase(const SCFToControlFlowBase &other) : ::mlir::OperationPass<>(other) {}
SCFToControlFlowBase& operator=(const SCFToControlFlowBase &) = delete;
SCFToControlFlowBase(SCFToControlFlowBase &&) = delete;
SCFToControlFlowBase& operator=(SCFToControlFlowBase &&) = delete;
~SCFToControlFlowBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-scf-to-cf");
}
::llvm::StringRef getArgument() const override { return "convert-scf-to-cf"; }
::llvm::StringRef getDescription() const override { return "Convert SCF dialect to ControlFlow dialect, replacing structured control flow with a CFG"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SCFToControlFlow");
}
::llvm::StringRef getName() const override { return "SCFToControlFlow"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<cf::ControlFlowDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SCFToControlFlowBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_SCFTOCONTROLFLOW
#endif
#ifdef GEN_PASS_DECL_SCFTOEMITC
std::unique_ptr<::mlir::Pass> createSCFToEmitC();
#undef GEN_PASS_DECL_SCFTOEMITC
#endif
#ifdef GEN_PASS_DEF_SCFTOEMITC
namespace impl {
std::unique_ptr<::mlir::Pass> createSCFToEmitC();
}
namespace impl {
template <typename DerivedT>
class SCFToEmitCBase : public ::mlir::OperationPass<> {
public:
using Base = SCFToEmitCBase;
SCFToEmitCBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
SCFToEmitCBase(const SCFToEmitCBase &other) : ::mlir::OperationPass<>(other) {}
SCFToEmitCBase& operator=(const SCFToEmitCBase &) = delete;
SCFToEmitCBase(SCFToEmitCBase &&) = delete;
SCFToEmitCBase& operator=(SCFToEmitCBase &&) = delete;
~SCFToEmitCBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-scf-to-emitc");
}
::llvm::StringRef getArgument() const override { return "convert-scf-to-emitc"; }
::llvm::StringRef getDescription() const override { return "Convert SCF dialect to EmitC dialect, maintaining structured control flow"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SCFToEmitC");
}
::llvm::StringRef getName() const override { return "SCFToEmitC"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<emitc::EmitCDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SCFToEmitCBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createSCFToEmitC() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createSCFToEmitC() {
return impl::createSCFToEmitC();
}
#undef GEN_PASS_DEF_SCFTOEMITC
#endif
#ifdef GEN_PASS_DECL_SCFTOSPIRV
std::unique_ptr<::mlir::Pass> createSCFToSPIRV();
#undef GEN_PASS_DECL_SCFTOSPIRV
#endif
#ifdef GEN_PASS_DEF_SCFTOSPIRV
namespace impl {
std::unique_ptr<::mlir::Pass> createSCFToSPIRV();
}
namespace impl {
template <typename DerivedT>
class SCFToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = SCFToSPIRVBase;
SCFToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
SCFToSPIRVBase(const SCFToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
SCFToSPIRVBase& operator=(const SCFToSPIRVBase &) = delete;
SCFToSPIRVBase(SCFToSPIRVBase &&) = delete;
SCFToSPIRVBase& operator=(SCFToSPIRVBase &&) = delete;
~SCFToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-scf-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-scf-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert SCF dialect to SPIR-V dialect."; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SCFToSPIRV");
}
::llvm::StringRef getName() const override { return "SCFToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SCFToSPIRVBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createSCFToSPIRV() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createSCFToSPIRV() {
return impl::createSCFToSPIRV();
}
#undef GEN_PASS_DEF_SCFTOSPIRV
#endif
#ifdef GEN_PASS_DECL_SETLLVMMODULEDATALAYOUTPASS
struct SetLLVMModuleDataLayoutPassOptions {
std::string dataLayout = "";
};
std::unique_ptr<::mlir::Pass> createSetLLVMModuleDataLayoutPass();
std::unique_ptr<::mlir::Pass> createSetLLVMModuleDataLayoutPass(SetLLVMModuleDataLayoutPassOptions options);
#undef GEN_PASS_DECL_SETLLVMMODULEDATALAYOUTPASS
#endif
#ifdef GEN_PASS_DEF_SETLLVMMODULEDATALAYOUTPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createSetLLVMModuleDataLayoutPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createSetLLVMModuleDataLayoutPass(SetLLVMModuleDataLayoutPassOptions options);
}
namespace impl {
template <typename DerivedT>
class SetLLVMModuleDataLayoutPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = SetLLVMModuleDataLayoutPassBase;
SetLLVMModuleDataLayoutPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
SetLLVMModuleDataLayoutPassBase(const SetLLVMModuleDataLayoutPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
SetLLVMModuleDataLayoutPassBase& operator=(const SetLLVMModuleDataLayoutPassBase &) = delete;
SetLLVMModuleDataLayoutPassBase(SetLLVMModuleDataLayoutPassBase &&) = delete;
SetLLVMModuleDataLayoutPassBase& operator=(SetLLVMModuleDataLayoutPassBase &&) = delete;
~SetLLVMModuleDataLayoutPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("set-llvm-module-datalayout");
}
::llvm::StringRef getArgument() const override { return "set-llvm-module-datalayout"; }
::llvm::StringRef getDescription() const override { return "Attach a datalayout string as a module attribute"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SetLLVMModuleDataLayoutPass");
}
::llvm::StringRef getName() const override { return "SetLLVMModuleDataLayoutPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SetLLVMModuleDataLayoutPassBase<DerivedT>)
SetLLVMModuleDataLayoutPassBase(SetLLVMModuleDataLayoutPassOptions options) : SetLLVMModuleDataLayoutPassBase() {
dataLayout = std::move(options.dataLayout);
}
protected:
::mlir::Pass::Option<std::string> dataLayout{*this, "data-layout", ::llvm::cl::desc("String description (LLVM format) of the data layout that is expected on the produced module"), ::llvm::cl::init("")};
private:
friend std::unique_ptr<::mlir::Pass> createSetLLVMModuleDataLayoutPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createSetLLVMModuleDataLayoutPass(SetLLVMModuleDataLayoutPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createSetLLVMModuleDataLayoutPass() {
return impl::createSetLLVMModuleDataLayoutPass();
}
std::unique_ptr<::mlir::Pass> createSetLLVMModuleDataLayoutPass(SetLLVMModuleDataLayoutPassOptions options) {
return impl::createSetLLVMModuleDataLayoutPass(std::move(options));
}
#undef GEN_PASS_DEF_SETLLVMMODULEDATALAYOUTPASS
#endif
#ifdef GEN_PASS_DECL_TOSATOARITH
struct TosaToArithOptions {
bool includeApplyRescale = false;
bool use32Bit = false;
};
#undef GEN_PASS_DECL_TOSATOARITH
#endif
#ifdef GEN_PASS_DEF_TOSATOARITH
namespace impl {
template <typename DerivedT>
class TosaToArithBase : public ::mlir::OperationPass<> {
public:
using Base = TosaToArithBase;
TosaToArithBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
TosaToArithBase(const TosaToArithBase &other) : ::mlir::OperationPass<>(other) {}
TosaToArithBase& operator=(const TosaToArithBase &) = delete;
TosaToArithBase(TosaToArithBase &&) = delete;
TosaToArithBase& operator=(TosaToArithBase &&) = delete;
~TosaToArithBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("tosa-to-arith");
}
::llvm::StringRef getArgument() const override { return "tosa-to-arith"; }
::llvm::StringRef getDescription() const override { return "Lower TOSA to the Arith dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("TosaToArith");
}
::llvm::StringRef getName() const override { return "TosaToArith"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TosaToArithBase<DerivedT>)
TosaToArithBase(TosaToArithOptions options) : TosaToArithBase() {
includeApplyRescale = std::move(options.includeApplyRescale);
use32Bit = std::move(options.use32Bit);
}
protected:
::mlir::Pass::Option<bool> includeApplyRescale{*this, "include-apply-rescale", ::llvm::cl::desc("Whether to include the lowering for tosa.apply_rescale to arith"), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> use32Bit{*this, "use-32-bit", ::llvm::cl::desc("Whether to prioritze lowering to 32-bit operations"), ::llvm::cl::init(false)};
private:
};
}
#undef GEN_PASS_DEF_TOSATOARITH
#endif
#ifdef GEN_PASS_DECL_TOSATOLINALG
struct TosaToLinalgOptions {
bool disableTosaDecompositions = false;
bool aggressiveReduceConstant = false;
};
#undef GEN_PASS_DECL_TOSATOLINALG
#endif
#ifdef GEN_PASS_DEF_TOSATOLINALG
namespace impl {
template <typename DerivedT>
class TosaToLinalgBase : public ::mlir::InterfacePass<FunctionOpInterface> {
public:
using Base = TosaToLinalgBase;
TosaToLinalgBase() : ::mlir::InterfacePass<FunctionOpInterface>(::mlir::TypeID::get<DerivedT>()) {}
TosaToLinalgBase(const TosaToLinalgBase &other) : ::mlir::InterfacePass<FunctionOpInterface>(other) {}
TosaToLinalgBase& operator=(const TosaToLinalgBase &) = delete;
TosaToLinalgBase(TosaToLinalgBase &&) = delete;
TosaToLinalgBase& operator=(TosaToLinalgBase &&) = delete;
~TosaToLinalgBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("tosa-to-linalg");
}
::llvm::StringRef getArgument() const override { return "tosa-to-linalg"; }
::llvm::StringRef getDescription() const override { return "Lower TOSA to LinAlg on tensors"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("TosaToLinalg");
}
::llvm::StringRef getName() const override { return "TosaToLinalg"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TosaToLinalgBase<DerivedT>)
TosaToLinalgBase(TosaToLinalgOptions options) : TosaToLinalgBase() {
disableTosaDecompositions = std::move(options.disableTosaDecompositions);
aggressiveReduceConstant = std::move(options.aggressiveReduceConstant);
}
protected:
::mlir::Pass::Option<bool> disableTosaDecompositions{*this, "disable-tosa-decompositions", ::llvm::cl::desc("Disable tosa decompositions pass"), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> aggressiveReduceConstant{*this, "aggressive-reduce-constant", ::llvm::cl::desc("Always perform the reduce constant optimization"), ::llvm::cl::init(false)};
private:
};
}
#undef GEN_PASS_DEF_TOSATOLINALG
#endif
#ifdef GEN_PASS_DECL_TOSATOLINALGNAMED
struct TosaToLinalgNamedOptions {
bool preferConv2DKernelLayoutHWCF = false;
};
#undef GEN_PASS_DECL_TOSATOLINALGNAMED
#endif
#ifdef GEN_PASS_DEF_TOSATOLINALGNAMED
namespace impl {
template <typename DerivedT>
class TosaToLinalgNamedBase : public ::mlir::InterfacePass<FunctionOpInterface> {
public:
using Base = TosaToLinalgNamedBase;
TosaToLinalgNamedBase() : ::mlir::InterfacePass<FunctionOpInterface>(::mlir::TypeID::get<DerivedT>()) {}
TosaToLinalgNamedBase(const TosaToLinalgNamedBase &other) : ::mlir::InterfacePass<FunctionOpInterface>(other) {}
TosaToLinalgNamedBase& operator=(const TosaToLinalgNamedBase &) = delete;
TosaToLinalgNamedBase(TosaToLinalgNamedBase &&) = delete;
TosaToLinalgNamedBase& operator=(TosaToLinalgNamedBase &&) = delete;
~TosaToLinalgNamedBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("tosa-to-linalg-named");
}
::llvm::StringRef getArgument() const override { return "tosa-to-linalg-named"; }
::llvm::StringRef getDescription() const override { return "Lower TOSA to LinAlg named operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("TosaToLinalgNamed");
}
::llvm::StringRef getName() const override { return "TosaToLinalgNamed"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TosaToLinalgNamedBase<DerivedT>)
TosaToLinalgNamedBase(TosaToLinalgNamedOptions options) : TosaToLinalgNamedBase() {
preferConv2DKernelLayoutHWCF = std::move(options.preferConv2DKernelLayoutHWCF);
}
protected:
::mlir::Pass::Option<bool> preferConv2DKernelLayoutHWCF{*this, "prefer-conv2d-kernel-layout-hwcf", ::llvm::cl::desc("Prefer generating linalg.conv_2d_nhwc_hwcf over linalg.conv_2d_nhwc_fhwc"), ::llvm::cl::init(false)};
private:
};
}
#undef GEN_PASS_DEF_TOSATOLINALGNAMED
#endif
#ifdef GEN_PASS_DECL_TOSATOMLPROGRAM
std::unique_ptr<::mlir::Pass> createTosaToMLProgram();
#undef GEN_PASS_DECL_TOSATOMLPROGRAM
#endif
#ifdef GEN_PASS_DEF_TOSATOMLPROGRAM
namespace impl {
std::unique_ptr<::mlir::Pass> createTosaToMLProgram();
}
namespace impl {
template <typename DerivedT>
class TosaToMLProgramBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = TosaToMLProgramBase;
TosaToMLProgramBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
TosaToMLProgramBase(const TosaToMLProgramBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
TosaToMLProgramBase& operator=(const TosaToMLProgramBase &) = delete;
TosaToMLProgramBase(TosaToMLProgramBase &&) = delete;
TosaToMLProgramBase& operator=(TosaToMLProgramBase &&) = delete;
~TosaToMLProgramBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("tosa-to-mlprogram");
}
::llvm::StringRef getArgument() const override { return "tosa-to-mlprogram"; }
::llvm::StringRef getDescription() const override { return "Lower TOSA to the MLProgram dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("TosaToMLProgram");
}
::llvm::StringRef getName() const override { return "TosaToMLProgram"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<ml_program::MLProgramDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TosaToMLProgramBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createTosaToMLProgram() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createTosaToMLProgram() {
return impl::createTosaToMLProgram();
}
#undef GEN_PASS_DEF_TOSATOMLPROGRAM
#endif
#ifdef GEN_PASS_DECL_TOSATOSCF
#undef GEN_PASS_DECL_TOSATOSCF
#endif
#ifdef GEN_PASS_DEF_TOSATOSCF
namespace impl {
template <typename DerivedT>
class TosaToSCFBase : public ::mlir::OperationPass<> {
public:
using Base = TosaToSCFBase;
TosaToSCFBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
TosaToSCFBase(const TosaToSCFBase &other) : ::mlir::OperationPass<>(other) {}
TosaToSCFBase& operator=(const TosaToSCFBase &) = delete;
TosaToSCFBase(TosaToSCFBase &&) = delete;
TosaToSCFBase& operator=(TosaToSCFBase &&) = delete;
~TosaToSCFBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("tosa-to-scf");
}
::llvm::StringRef getArgument() const override { return "tosa-to-scf"; }
::llvm::StringRef getDescription() const override { return "Lower TOSA to the SCF dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("TosaToSCF");
}
::llvm::StringRef getName() const override { return "TosaToSCF"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<tensor::TensorDialect, scf::SCFDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TosaToSCFBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_TOSATOSCF
#endif
#ifdef GEN_PASS_DECL_TOSATOTENSOR
#undef GEN_PASS_DECL_TOSATOTENSOR
#endif
#ifdef GEN_PASS_DEF_TOSATOTENSOR
namespace impl {
template <typename DerivedT>
class TosaToTensorBase : public ::mlir::OperationPass<> {
public:
using Base = TosaToTensorBase;
TosaToTensorBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
TosaToTensorBase(const TosaToTensorBase &other) : ::mlir::OperationPass<>(other) {}
TosaToTensorBase& operator=(const TosaToTensorBase &) = delete;
TosaToTensorBase(TosaToTensorBase &&) = delete;
TosaToTensorBase& operator=(TosaToTensorBase &&) = delete;
~TosaToTensorBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("tosa-to-tensor");
}
::llvm::StringRef getArgument() const override { return "tosa-to-tensor"; }
::llvm::StringRef getDescription() const override { return "Lower TOSA to the Tensor dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("TosaToTensor");
}
::llvm::StringRef getName() const override { return "TosaToTensor"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<tensor::TensorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TosaToTensorBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_TOSATOTENSOR
#endif
#ifdef GEN_PASS_DECL_UBTOLLVMCONVERSIONPASS
struct UBToLLVMConversionPassOptions {
unsigned indexBitwidth = 0;
};
std::unique_ptr<::mlir::Pass> createUBToLLVMConversionPass();
std::unique_ptr<::mlir::Pass> createUBToLLVMConversionPass(UBToLLVMConversionPassOptions options);
#undef GEN_PASS_DECL_UBTOLLVMCONVERSIONPASS
#endif
#ifdef GEN_PASS_DEF_UBTOLLVMCONVERSIONPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createUBToLLVMConversionPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createUBToLLVMConversionPass(UBToLLVMConversionPassOptions options);
}
namespace impl {
template <typename DerivedT>
class UBToLLVMConversionPassBase : public ::mlir::OperationPass<> {
public:
using Base = UBToLLVMConversionPassBase;
UBToLLVMConversionPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
UBToLLVMConversionPassBase(const UBToLLVMConversionPassBase &other) : ::mlir::OperationPass<>(other) {}
UBToLLVMConversionPassBase& operator=(const UBToLLVMConversionPassBase &) = delete;
UBToLLVMConversionPassBase(UBToLLVMConversionPassBase &&) = delete;
UBToLLVMConversionPassBase& operator=(UBToLLVMConversionPassBase &&) = delete;
~UBToLLVMConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-ub-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-ub-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert UB dialect to LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("UBToLLVMConversionPass");
}
::llvm::StringRef getName() const override { return "UBToLLVMConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(UBToLLVMConversionPassBase<DerivedT>)
UBToLLVMConversionPassBase(UBToLLVMConversionPassOptions options) : UBToLLVMConversionPassBase() {
indexBitwidth = std::move(options.indexBitwidth);
}
protected:
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
private:
friend std::unique_ptr<::mlir::Pass> createUBToLLVMConversionPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createUBToLLVMConversionPass(UBToLLVMConversionPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createUBToLLVMConversionPass() {
return impl::createUBToLLVMConversionPass();
}
std::unique_ptr<::mlir::Pass> createUBToLLVMConversionPass(UBToLLVMConversionPassOptions options) {
return impl::createUBToLLVMConversionPass(std::move(options));
}
#undef GEN_PASS_DEF_UBTOLLVMCONVERSIONPASS
#endif
#ifdef GEN_PASS_DECL_UBTOSPIRVCONVERSIONPASS
std::unique_ptr<::mlir::Pass> createUBToSPIRVConversionPass();
#undef GEN_PASS_DECL_UBTOSPIRVCONVERSIONPASS
#endif
#ifdef GEN_PASS_DEF_UBTOSPIRVCONVERSIONPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createUBToSPIRVConversionPass();
}
namespace impl {
template <typename DerivedT>
class UBToSPIRVConversionPassBase : public ::mlir::OperationPass<> {
public:
using Base = UBToSPIRVConversionPassBase;
UBToSPIRVConversionPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
UBToSPIRVConversionPassBase(const UBToSPIRVConversionPassBase &other) : ::mlir::OperationPass<>(other) {}
UBToSPIRVConversionPassBase& operator=(const UBToSPIRVConversionPassBase &) = delete;
UBToSPIRVConversionPassBase(UBToSPIRVConversionPassBase &&) = delete;
UBToSPIRVConversionPassBase& operator=(UBToSPIRVConversionPassBase &&) = delete;
~UBToSPIRVConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-ub-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-ub-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert UB dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("UBToSPIRVConversionPass");
}
::llvm::StringRef getName() const override { return "UBToSPIRVConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(UBToSPIRVConversionPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createUBToSPIRVConversionPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createUBToSPIRVConversionPass() {
return impl::createUBToSPIRVConversionPass();
}
#undef GEN_PASS_DEF_UBTOSPIRVCONVERSIONPASS
#endif
#ifdef GEN_PASS_REGISTRATION
inline void registerArithToAMDGPUConversionPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createArithToAMDGPUConversionPass();
});
}
inline void registerArithToAMDGPUConversionPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createArithToAMDGPUConversionPass();
});
}
inline void registerArithToArmSMEConversionPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createArithToArmSMEConversionPass();
});
}
inline void registerArithToArmSMEConversionPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createArithToArmSMEConversionPass();
});
}
inline void registerArithToLLVMConversionPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createArithToLLVMConversionPass();
});
}
inline void registerArithToLLVMConversionPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createArithToLLVMConversionPass();
});
}
inline void registerConvertAMDGPUToROCDL() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertAMDGPUToROCDLPass();
});
}
inline void registerConvertAMDGPUToROCDLPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertAMDGPUToROCDLPass();
});
}
inline void registerConvertAffineForToGPU() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAffineForToGPUPass();
});
}
inline void registerConvertAffineForToGPUPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAffineForToGPUPass();
});
}
inline void registerConvertAffineToStandard() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createLowerAffinePass();
});
}
inline void registerConvertAffineToStandardPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createLowerAffinePass();
});
}
inline void registerConvertArithToEmitC() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertArithToEmitC();
});
}
inline void registerConvertArithToEmitCPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertArithToEmitC();
});
}
inline void registerConvertArithToSPIRV() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::arith::createConvertArithToSPIRVPass();
});
}
inline void registerConvertArithToSPIRVPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::arith::createConvertArithToSPIRVPass();
});
}
inline void registerConvertArmNeon2dToIntr() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertArmNeon2dToIntrPass();
});
}
inline void registerConvertArmNeon2dToIntrPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertArmNeon2dToIntrPass();
});
}
inline void registerConvertArmSMEToLLVM() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertArmSMEToLLVMPass();
});
}
inline void registerConvertArmSMEToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertArmSMEToLLVMPass();
});
}
inline void registerConvertArmSMEToSCF() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertArmSMEToSCFPass();
});
}
inline void registerConvertArmSMEToSCFPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertArmSMEToSCFPass();
});
}
inline void registerConvertAsyncToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertAsyncToLLVMPass();
});
}
inline void registerConvertAsyncToLLVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertAsyncToLLVMPass();
});
}
inline void registerConvertBufferizationToMemRef() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createBufferizationToMemRefPass();
});
}
inline void registerConvertBufferizationToMemRefPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createBufferizationToMemRefPass();
});
}
inline void registerConvertComplexToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertComplexToLLVMPass();
});
}
inline void registerConvertComplexToLLVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertComplexToLLVMPass();
});
}
inline void registerConvertComplexToLibm() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertComplexToLibmPass();
});
}
inline void registerConvertComplexToLibmPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertComplexToLibmPass();
});
}
inline void registerConvertComplexToSPIRVPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertComplexToSPIRVPass();
});
}
inline void registerConvertComplexToSPIRVPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertComplexToSPIRVPass();
});
}
inline void registerConvertComplexToStandard() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertComplexToStandardPass();
});
}
inline void registerConvertComplexToStandardPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertComplexToStandardPass();
});
}
inline void registerConvertControlFlowToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertControlFlowToLLVMPass();
});
}
inline void registerConvertControlFlowToLLVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertControlFlowToLLVMPass();
});
}
inline void registerConvertControlFlowToSPIRV() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertControlFlowToSPIRVPass();
});
}
inline void registerConvertControlFlowToSPIRVPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertControlFlowToSPIRVPass();
});
}
inline void registerConvertFuncToEmitC() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertFuncToEmitC();
});
}
inline void registerConvertFuncToEmitCPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertFuncToEmitC();
});
}
inline void registerConvertFuncToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertFuncToLLVMPass();
});
}
inline void registerConvertFuncToLLVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertFuncToLLVMPass();
});
}
inline void registerConvertFuncToSPIRV() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertFuncToSPIRVPass();
});
}
inline void registerConvertFuncToSPIRVPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertFuncToSPIRVPass();
});
}
inline void registerConvertGPUToSPIRV() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertGPUToSPIRVPass();
});
}
inline void registerConvertGPUToSPIRVPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertGPUToSPIRVPass();
});
}
inline void registerConvertGpuLaunchFuncToVulkanLaunchFunc() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertGpuLaunchFuncToVulkanLaunchFuncPass();
});
}
inline void registerConvertGpuLaunchFuncToVulkanLaunchFuncPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertGpuLaunchFuncToVulkanLaunchFuncPass();
});
}
inline void registerConvertGpuOpsToLLVMSPVOps() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertGpuOpsToLLVMSPVOps();
});
}
inline void registerConvertGpuOpsToLLVMSPVOpsPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertGpuOpsToLLVMSPVOps();
});
}
inline void registerConvertGpuOpsToNVVMOps() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertGpuOpsToNVVMOps();
});
}
inline void registerConvertGpuOpsToNVVMOpsPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertGpuOpsToNVVMOps();
});
}
inline void registerConvertGpuOpsToROCDLOps() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createLowerGpuOpsToROCDLOpsPass();
});
}
inline void registerConvertGpuOpsToROCDLOpsPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createLowerGpuOpsToROCDLOpsPass();
});
}
inline void registerConvertIndexToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertIndexToLLVMPass();
});
}
inline void registerConvertIndexToLLVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertIndexToLLVMPass();
});
}
inline void registerConvertIndexToSPIRVPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertIndexToSPIRVPass();
});
}
inline void registerConvertIndexToSPIRVPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertIndexToSPIRVPass();
});
}
inline void registerConvertLinalgToStandard() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertLinalgToStandardPass();
});
}
inline void registerConvertLinalgToStandardPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertLinalgToStandardPass();
});
}
inline void registerConvertMathToFuncs() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertMathToFuncs();
});
}
inline void registerConvertMathToFuncsPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertMathToFuncs();
});
}
inline void registerConvertMathToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertMathToLLVMPass();
});
}
inline void registerConvertMathToLLVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertMathToLLVMPass();
});
}
inline void registerConvertMathToLibm() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertMathToLibmPass();
});
}
inline void registerConvertMathToLibmPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertMathToLibmPass();
});
}
inline void registerConvertMathToROCDL() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertMathToROCDL();
});
}
inline void registerConvertMathToROCDLPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertMathToROCDL();
});
}
inline void registerConvertMathToSPIRV() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertMathToSPIRVPass();
});
}
inline void registerConvertMathToSPIRVPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertMathToSPIRVPass();
});
}
inline void registerConvertMemRefToEmitC() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertMemRefToEmitC();
});
}
inline void registerConvertMemRefToEmitCPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertMemRefToEmitC();
});
}
inline void registerConvertMemRefToSPIRV() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertMemRefToSPIRVPass();
});
}
inline void registerConvertMemRefToSPIRVPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertMemRefToSPIRVPass();
});
}
inline void registerConvertNVGPUToNVVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertNVGPUToNVVMPass();
});
}
inline void registerConvertNVGPUToNVVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertNVGPUToNVVMPass();
});
}
inline void registerConvertNVVMToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertNVVMToLLVMPass();
});
}
inline void registerConvertNVVMToLLVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertNVVMToLLVMPass();
});
}
inline void registerConvertOpenACCToSCF() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertOpenACCToSCFPass();
});
}
inline void registerConvertOpenACCToSCFPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertOpenACCToSCFPass();
});
}
inline void registerConvertOpenMPToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertOpenMPToLLVMPass();
});
}
inline void registerConvertOpenMPToLLVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertOpenMPToLLVMPass();
});
}
inline void registerConvertPDLToPDLInterp() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createPDLToPDLInterpPass();
});
}
inline void registerConvertPDLToPDLInterpPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createPDLToPDLInterpPass();
});
}
inline void registerConvertParallelLoopToGpu() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createParallelLoopToGpuPass();
});
}
inline void registerConvertParallelLoopToGpuPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createParallelLoopToGpuPass();
});
}
inline void registerConvertSCFToOpenMPPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertSCFToOpenMPPass();
});
}
inline void registerConvertSCFToOpenMPPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertSCFToOpenMPPass();
});
}
inline void registerConvertSPIRVToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertSPIRVToLLVMPass();
});
}
inline void registerConvertSPIRVToLLVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertSPIRVToLLVMPass();
});
}
inline void registerConvertShapeConstraints() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertShapeConstraintsPass();
});
}
inline void registerConvertShapeConstraintsPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertShapeConstraintsPass();
});
}
inline void registerConvertShapeToStandard() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertShapeToStandardPass();
});
}
inline void registerConvertShapeToStandardPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertShapeToStandardPass();
});
}
inline void registerConvertTensorToLinalg() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertTensorToLinalgPass();
});
}
inline void registerConvertTensorToLinalgPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertTensorToLinalgPass();
});
}
inline void registerConvertTensorToSPIRV() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertTensorToSPIRVPass();
});
}
inline void registerConvertTensorToSPIRVPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertTensorToSPIRVPass();
});
}
inline void registerConvertToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertToLLVMPass();
});
}
inline void registerConvertToLLVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertToLLVMPass();
});
}
inline void registerConvertToSPIRVPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertToSPIRVPass();
});
}
inline void registerConvertToSPIRVPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertToSPIRVPass();
});
}
inline void registerConvertVectorToArmSME() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertVectorToArmSMEPass();
});
}
inline void registerConvertVectorToArmSMEPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertVectorToArmSMEPass();
});
}
inline void registerConvertVectorToGPU() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertVectorToGPUPass();
});
}
inline void registerConvertVectorToGPUPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertVectorToGPUPass();
});
}
inline void registerConvertVectorToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertVectorToLLVMPass();
});
}
inline void registerConvertVectorToLLVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertVectorToLLVMPass();
});
}
inline void registerConvertVectorToSCF() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertVectorToSCFPass();
});
}
inline void registerConvertVectorToSCFPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertVectorToSCFPass();
});
}
inline void registerConvertVectorToSPIRV() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertVectorToSPIRVPass();
});
}
inline void registerConvertVectorToSPIRVPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertVectorToSPIRVPass();
});
}
inline void registerConvertVectorToXeGPU() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertVectorToXeGPUPass();
});
}
inline void registerConvertVectorToXeGPUPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertVectorToXeGPUPass();
});
}
inline void registerConvertVulkanLaunchFuncToVulkanCallsPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertVulkanLaunchFuncToVulkanCallsPass();
});
}
inline void registerConvertVulkanLaunchFuncToVulkanCallsPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createConvertVulkanLaunchFuncToVulkanCallsPass();
});
}
inline void registerFinalizeMemRefToLLVMConversionPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createFinalizeMemRefToLLVMConversionPass();
});
}
inline void registerFinalizeMemRefToLLVMConversionPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createFinalizeMemRefToLLVMConversionPass();
});
}
inline void registerGpuToLLVMConversionPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createGpuToLLVMConversionPass();
});
}
inline void registerGpuToLLVMConversionPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createGpuToLLVMConversionPass();
});
}
inline void registerLiftControlFlowToSCFPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createLiftControlFlowToSCFPass();
});
}
inline void registerLiftControlFlowToSCFPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createLiftControlFlowToSCFPass();
});
}
inline void registerLowerHostCodeToLLVMPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createLowerHostCodeToLLVMPass();
});
}
inline void registerLowerHostCodeToLLVMPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createLowerHostCodeToLLVMPass();
});
}
inline void registerMapMemRefStorageClass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createMapMemRefStorageClassPass();
});
}
inline void registerMapMemRefStorageClassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createMapMemRefStorageClassPass();
});
}
inline void registerReconcileUnrealizedCasts() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createReconcileUnrealizedCastsPass();
});
}
inline void registerReconcileUnrealizedCastsPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createReconcileUnrealizedCastsPass();
});
}
inline void registerSCFToControlFlow() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertSCFToCFPass();
});
}
inline void registerSCFToControlFlowPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createConvertSCFToCFPass();
});
}
inline void registerSCFToEmitC() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSCFToEmitC();
});
}
inline void registerSCFToEmitCPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSCFToEmitC();
});
}
inline void registerSCFToSPIRV() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSCFToSPIRV();
});
}
inline void registerSCFToSPIRVPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSCFToSPIRV();
});
}
inline void registerSetLLVMModuleDataLayoutPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSetLLVMModuleDataLayoutPass();
});
}
inline void registerSetLLVMModuleDataLayoutPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSetLLVMModuleDataLayoutPass();
});
}
inline void registerTosaToArith() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return tosa::createTosaToArith();
});
}
inline void registerTosaToArithPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return tosa::createTosaToArith();
});
}
inline void registerTosaToLinalg() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return tosa::createTosaToLinalg();
});
}
inline void registerTosaToLinalgPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return tosa::createTosaToLinalg();
});
}
inline void registerTosaToLinalgNamed() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return tosa::createTosaToLinalgNamed();
});
}
inline void registerTosaToLinalgNamedPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return tosa::createTosaToLinalgNamed();
});
}
inline void registerTosaToMLProgram() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createTosaToMLProgram();
});
}
inline void registerTosaToMLProgramPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createTosaToMLProgram();
});
}
inline void registerTosaToSCF() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return tosa::createTosaToSCF();
});
}
inline void registerTosaToSCFPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return tosa::createTosaToSCF();
});
}
inline void registerTosaToTensor() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return tosa::createTosaToTensor();
});
}
inline void registerTosaToTensorPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return tosa::createTosaToTensor();
});
}
inline void registerUBToLLVMConversionPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createUBToLLVMConversionPass();
});
}
inline void registerUBToLLVMConversionPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createUBToLLVMConversionPass();
});
}
inline void registerUBToSPIRVConversionPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createUBToSPIRVConversionPass();
});
}
inline void registerUBToSPIRVConversionPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createUBToSPIRVConversionPass();
});
}
inline void registerConversionPasses() {
registerArithToAMDGPUConversionPass();
registerArithToArmSMEConversionPass();
registerArithToLLVMConversionPass();
registerConvertAMDGPUToROCDL();
registerConvertAffineForToGPU();
registerConvertAffineToStandard();
registerConvertArithToEmitC();
registerConvertArithToSPIRV();
registerConvertArmNeon2dToIntr();
registerConvertArmSMEToLLVM();
registerConvertArmSMEToSCF();
registerConvertAsyncToLLVMPass();
registerConvertBufferizationToMemRef();
registerConvertComplexToLLVMPass();
registerConvertComplexToLibm();
registerConvertComplexToSPIRVPass();
registerConvertComplexToStandard();
registerConvertControlFlowToLLVMPass();
registerConvertControlFlowToSPIRV();
registerConvertFuncToEmitC();
registerConvertFuncToLLVMPass();
registerConvertFuncToSPIRV();
registerConvertGPUToSPIRV();
registerConvertGpuLaunchFuncToVulkanLaunchFunc();
registerConvertGpuOpsToLLVMSPVOps();
registerConvertGpuOpsToNVVMOps();
registerConvertGpuOpsToROCDLOps();
registerConvertIndexToLLVMPass();
registerConvertIndexToSPIRVPass();
registerConvertLinalgToStandard();
registerConvertMathToFuncs();
registerConvertMathToLLVMPass();
registerConvertMathToLibm();
registerConvertMathToROCDL();
registerConvertMathToSPIRV();
registerConvertMemRefToEmitC();
registerConvertMemRefToSPIRV();
registerConvertNVGPUToNVVMPass();
registerConvertNVVMToLLVMPass();
registerConvertOpenACCToSCF();
registerConvertOpenMPToLLVMPass();
registerConvertPDLToPDLInterp();
registerConvertParallelLoopToGpu();
registerConvertSCFToOpenMPPass();
registerConvertSPIRVToLLVMPass();
registerConvertShapeConstraints();
registerConvertShapeToStandard();
registerConvertTensorToLinalg();
registerConvertTensorToSPIRV();
registerConvertToLLVMPass();
registerConvertToSPIRVPass();
registerConvertVectorToArmSME();
registerConvertVectorToGPU();
registerConvertVectorToLLVMPass();
registerConvertVectorToSCF();
registerConvertVectorToSPIRV();
registerConvertVectorToXeGPU();
registerConvertVulkanLaunchFuncToVulkanCallsPass();
registerFinalizeMemRefToLLVMConversionPass();
registerGpuToLLVMConversionPass();
registerLiftControlFlowToSCFPass();
registerLowerHostCodeToLLVMPass();
registerMapMemRefStorageClass();
registerReconcileUnrealizedCasts();
registerSCFToControlFlow();
registerSCFToEmitC();
registerSCFToSPIRV();
registerSetLLVMModuleDataLayoutPass();
registerTosaToArith();
registerTosaToLinalg();
registerTosaToLinalgNamed();
registerTosaToMLProgram();
registerTosaToSCF();
registerTosaToTensor();
registerUBToLLVMConversionPass();
registerUBToSPIRVConversionPass();
}
#undef GEN_PASS_REGISTRATION
#endif
#ifdef GEN_PASS_CLASSES
template <typename DerivedT>
class ArithToAMDGPUConversionPassBase : public ::mlir::OperationPass<> {
public:
using Base = ArithToAMDGPUConversionPassBase;
ArithToAMDGPUConversionPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ArithToAMDGPUConversionPassBase(const ArithToAMDGPUConversionPassBase &other) : ::mlir::OperationPass<>(other) {}
ArithToAMDGPUConversionPassBase& operator=(const ArithToAMDGPUConversionPassBase &) = delete;
ArithToAMDGPUConversionPassBase(ArithToAMDGPUConversionPassBase &&) = delete;
ArithToAMDGPUConversionPassBase& operator=(ArithToAMDGPUConversionPassBase &&) = delete;
~ArithToAMDGPUConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arith-to-amdgpu");
}
::llvm::StringRef getArgument() const override { return "convert-arith-to-amdgpu"; }
::llvm::StringRef getDescription() const override { return "Convert Arith operations to AMDGPU-specific implementations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ArithToAMDGPUConversionPass");
}
::llvm::StringRef getName() const override { return "ArithToAMDGPUConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<amdgpu::AMDGPUDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ArithToAMDGPUConversionPassBase<DerivedT>)
protected:
::mlir::Pass::Option<std::string> chipset{*this, "chipset", ::llvm::cl::desc("Chipset that these operations will run on"), ::llvm::cl::init("gfx000")};
::mlir::Pass::Option<bool> saturateFP8Truncf{*this, "saturate-fp8-truncf", ::llvm::cl::desc("Use saturating truncation for 8-bit float types"), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> allowPackedF16Rtz{*this, "allow-packed-f16-round-to-zero", ::llvm::cl::desc("Whether we should allow f32->f16 packed round-to-zero conversion"), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class ArithToArmSMEConversionPassBase : public ::mlir::OperationPass<> {
public:
using Base = ArithToArmSMEConversionPassBase;
ArithToArmSMEConversionPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ArithToArmSMEConversionPassBase(const ArithToArmSMEConversionPassBase &other) : ::mlir::OperationPass<>(other) {}
ArithToArmSMEConversionPassBase& operator=(const ArithToArmSMEConversionPassBase &) = delete;
ArithToArmSMEConversionPassBase(ArithToArmSMEConversionPassBase &&) = delete;
ArithToArmSMEConversionPassBase& operator=(ArithToArmSMEConversionPassBase &&) = delete;
~ArithToArmSMEConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arith-to-arm-sme");
}
::llvm::StringRef getArgument() const override { return "convert-arith-to-arm-sme"; }
::llvm::StringRef getDescription() const override { return "Convert Arith dialect to ArmSME dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ArithToArmSMEConversionPass");
}
::llvm::StringRef getName() const override { return "ArithToArmSMEConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arm_sme::ArmSMEDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ArithToArmSMEConversionPassBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ArithToLLVMConversionPassBase : public ::mlir::OperationPass<> {
public:
using Base = ArithToLLVMConversionPassBase;
ArithToLLVMConversionPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ArithToLLVMConversionPassBase(const ArithToLLVMConversionPassBase &other) : ::mlir::OperationPass<>(other) {}
ArithToLLVMConversionPassBase& operator=(const ArithToLLVMConversionPassBase &) = delete;
ArithToLLVMConversionPassBase(ArithToLLVMConversionPassBase &&) = delete;
ArithToLLVMConversionPassBase& operator=(ArithToLLVMConversionPassBase &&) = delete;
~ArithToLLVMConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arith-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-arith-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert Arith dialect to LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ArithToLLVMConversionPass");
}
::llvm::StringRef getName() const override { return "ArithToLLVMConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ArithToLLVMConversionPassBase<DerivedT>)
protected:
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
};
template <typename DerivedT>
class ConvertAMDGPUToROCDLBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertAMDGPUToROCDLBase;
ConvertAMDGPUToROCDLBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertAMDGPUToROCDLBase(const ConvertAMDGPUToROCDLBase &other) : ::mlir::OperationPass<>(other) {}
ConvertAMDGPUToROCDLBase& operator=(const ConvertAMDGPUToROCDLBase &) = delete;
ConvertAMDGPUToROCDLBase(ConvertAMDGPUToROCDLBase &&) = delete;
ConvertAMDGPUToROCDLBase& operator=(ConvertAMDGPUToROCDLBase &&) = delete;
~ConvertAMDGPUToROCDLBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-amdgpu-to-rocdl");
}
::llvm::StringRef getArgument() const override { return "convert-amdgpu-to-rocdl"; }
::llvm::StringRef getDescription() const override { return "Convert AMDGPU dialect to ROCDL dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertAMDGPUToROCDL");
}
::llvm::StringRef getName() const override { return "ConvertAMDGPUToROCDL"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
registry.insert<ROCDL::ROCDLDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertAMDGPUToROCDLBase<DerivedT>)
protected:
::mlir::Pass::Option<std::string> chipset{*this, "chipset", ::llvm::cl::desc("Chipset that these operations will run on"), ::llvm::cl::init("gfx000")};
};
template <typename DerivedT>
class ConvertAffineForToGPUBase : public ::mlir::InterfacePass<FunctionOpInterface> {
public:
using Base = ConvertAffineForToGPUBase;
ConvertAffineForToGPUBase() : ::mlir::InterfacePass<FunctionOpInterface>(::mlir::TypeID::get<DerivedT>()) {}
ConvertAffineForToGPUBase(const ConvertAffineForToGPUBase &other) : ::mlir::InterfacePass<FunctionOpInterface>(other) {}
ConvertAffineForToGPUBase& operator=(const ConvertAffineForToGPUBase &) = delete;
ConvertAffineForToGPUBase(ConvertAffineForToGPUBase &&) = delete;
ConvertAffineForToGPUBase& operator=(ConvertAffineForToGPUBase &&) = delete;
~ConvertAffineForToGPUBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-affine-for-to-gpu");
}
::llvm::StringRef getArgument() const override { return "convert-affine-for-to-gpu"; }
::llvm::StringRef getDescription() const override { return "Convert top-level AffineFor Ops to GPU kernels"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertAffineForToGPU");
}
::llvm::StringRef getName() const override { return "ConvertAffineForToGPU"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<gpu::GPUDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertAffineForToGPUBase<DerivedT>)
protected:
::mlir::Pass::Option<unsigned> numBlockDims{*this, "gpu-block-dims", ::llvm::cl::desc("Number of GPU block dimensions for mapping"), ::llvm::cl::init(1u)};
::mlir::Pass::Option<unsigned> numThreadDims{*this, "gpu-thread-dims", ::llvm::cl::desc("Number of GPU thread dimensions for mapping"), ::llvm::cl::init(1u)};
};
template <typename DerivedT>
class ConvertAffineToStandardBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertAffineToStandardBase;
ConvertAffineToStandardBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertAffineToStandardBase(const ConvertAffineToStandardBase &other) : ::mlir::OperationPass<>(other) {}
ConvertAffineToStandardBase& operator=(const ConvertAffineToStandardBase &) = delete;
ConvertAffineToStandardBase(ConvertAffineToStandardBase &&) = delete;
ConvertAffineToStandardBase& operator=(ConvertAffineToStandardBase &&) = delete;
~ConvertAffineToStandardBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("lower-affine");
}
::llvm::StringRef getArgument() const override { return "lower-affine"; }
::llvm::StringRef getDescription() const override { return "Lower Affine operations to a combination of Standard and SCF operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertAffineToStandard");
}
::llvm::StringRef getName() const override { return "ConvertAffineToStandard"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<memref::MemRefDialect>();
registry.insert<scf::SCFDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertAffineToStandardBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertArithToEmitCBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertArithToEmitCBase;
ConvertArithToEmitCBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertArithToEmitCBase(const ConvertArithToEmitCBase &other) : ::mlir::OperationPass<>(other) {}
ConvertArithToEmitCBase& operator=(const ConvertArithToEmitCBase &) = delete;
ConvertArithToEmitCBase(ConvertArithToEmitCBase &&) = delete;
ConvertArithToEmitCBase& operator=(ConvertArithToEmitCBase &&) = delete;
~ConvertArithToEmitCBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arith-to-emitc");
}
::llvm::StringRef getArgument() const override { return "convert-arith-to-emitc"; }
::llvm::StringRef getDescription() const override { return "Convert Arith dialect to EmitC dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertArithToEmitC");
}
::llvm::StringRef getName() const override { return "ConvertArithToEmitC"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<emitc::EmitCDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertArithToEmitCBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertArithToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertArithToSPIRVBase;
ConvertArithToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertArithToSPIRVBase(const ConvertArithToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertArithToSPIRVBase& operator=(const ConvertArithToSPIRVBase &) = delete;
ConvertArithToSPIRVBase(ConvertArithToSPIRVBase &&) = delete;
ConvertArithToSPIRVBase& operator=(ConvertArithToSPIRVBase &&) = delete;
~ConvertArithToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arith-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-arith-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert Arith dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertArithToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertArithToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertArithToSPIRVBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> emulateLT32BitScalarTypes{*this, "emulate-lt-32-bit-scalar-types", ::llvm::cl::desc("Emulate narrower scalar types with 32-bit ones if not supported by the target"), ::llvm::cl::init(true)};
};
template <typename DerivedT>
class ConvertArmNeon2dToIntrBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertArmNeon2dToIntrBase;
ConvertArmNeon2dToIntrBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertArmNeon2dToIntrBase(const ConvertArmNeon2dToIntrBase &other) : ::mlir::OperationPass<>(other) {}
ConvertArmNeon2dToIntrBase& operator=(const ConvertArmNeon2dToIntrBase &) = delete;
ConvertArmNeon2dToIntrBase(ConvertArmNeon2dToIntrBase &&) = delete;
ConvertArmNeon2dToIntrBase& operator=(ConvertArmNeon2dToIntrBase &&) = delete;
~ConvertArmNeon2dToIntrBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("arm-neon-2d-to-intr");
}
::llvm::StringRef getArgument() const override { return "arm-neon-2d-to-intr"; }
::llvm::StringRef getDescription() const override { return "Convert Arm NEON structured ops to intrinsics"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertArmNeon2dToIntr");
}
::llvm::StringRef getName() const override { return "ConvertArmNeon2dToIntr"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arm_neon::ArmNeonDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertArmNeon2dToIntrBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertArmSMEToLLVMBase : public ::mlir::InterfacePass<FunctionOpInterface> {
public:
using Base = ConvertArmSMEToLLVMBase;
ConvertArmSMEToLLVMBase() : ::mlir::InterfacePass<FunctionOpInterface>(::mlir::TypeID::get<DerivedT>()) {}
ConvertArmSMEToLLVMBase(const ConvertArmSMEToLLVMBase &other) : ::mlir::InterfacePass<FunctionOpInterface>(other) {}
ConvertArmSMEToLLVMBase& operator=(const ConvertArmSMEToLLVMBase &) = delete;
ConvertArmSMEToLLVMBase(ConvertArmSMEToLLVMBase &&) = delete;
ConvertArmSMEToLLVMBase& operator=(ConvertArmSMEToLLVMBase &&) = delete;
~ConvertArmSMEToLLVMBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arm-sme-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-arm-sme-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the ArmSME dialect into the LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertArmSMEToLLVM");
}
::llvm::StringRef getName() const override { return "ConvertArmSMEToLLVM"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arm_sme::ArmSMEDialect>();
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertArmSMEToLLVMBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> dumpTileLiveRanges{*this, "dump-tile-live-ranges", ::llvm::cl::desc("Dump the live ranges of SME tiles (for debugging)"), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class ConvertArmSMEToSCFBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertArmSMEToSCFBase;
ConvertArmSMEToSCFBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertArmSMEToSCFBase(const ConvertArmSMEToSCFBase &other) : ::mlir::OperationPass<>(other) {}
ConvertArmSMEToSCFBase& operator=(const ConvertArmSMEToSCFBase &) = delete;
ConvertArmSMEToSCFBase(ConvertArmSMEToSCFBase &&) = delete;
ConvertArmSMEToSCFBase& operator=(ConvertArmSMEToSCFBase &&) = delete;
~ConvertArmSMEToSCFBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-arm-sme-to-scf");
}
::llvm::StringRef getArgument() const override { return "convert-arm-sme-to-scf"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the ArmSME dialect into the SCF dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertArmSMEToSCF");
}
::llvm::StringRef getName() const override { return "ConvertArmSMEToSCF"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<scf::SCFDialect>();
registry.insert<arith::ArithDialect>();
registry.insert<vector::VectorDialect>();
registry.insert<arm_sme::ArmSMEDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertArmSMEToSCFBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertAsyncToLLVMPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertAsyncToLLVMPassBase;
ConvertAsyncToLLVMPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertAsyncToLLVMPassBase(const ConvertAsyncToLLVMPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertAsyncToLLVMPassBase& operator=(const ConvertAsyncToLLVMPassBase &) = delete;
ConvertAsyncToLLVMPassBase(ConvertAsyncToLLVMPassBase &&) = delete;
ConvertAsyncToLLVMPassBase& operator=(ConvertAsyncToLLVMPassBase &&) = delete;
~ConvertAsyncToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-async-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-async-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert the operations from the async dialect into the LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertAsyncToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertAsyncToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
registry.insert<async::AsyncDialect>();
registry.insert<LLVM::LLVMDialect>();
registry.insert<func::FuncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertAsyncToLLVMPassBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertBufferizationToMemRefBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertBufferizationToMemRefBase;
ConvertBufferizationToMemRefBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertBufferizationToMemRefBase(const ConvertBufferizationToMemRefBase &other) : ::mlir::OperationPass<>(other) {}
ConvertBufferizationToMemRefBase& operator=(const ConvertBufferizationToMemRefBase &) = delete;
ConvertBufferizationToMemRefBase(ConvertBufferizationToMemRefBase &&) = delete;
ConvertBufferizationToMemRefBase& operator=(ConvertBufferizationToMemRefBase &&) = delete;
~ConvertBufferizationToMemRefBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-bufferization-to-memref");
}
::llvm::StringRef getArgument() const override { return "convert-bufferization-to-memref"; }
::llvm::StringRef getDescription() const override { return "Convert operations from the Bufferization dialect to the MemRef dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertBufferizationToMemRef");
}
::llvm::StringRef getName() const override { return "ConvertBufferizationToMemRef"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
registry.insert<memref::MemRefDialect>();
registry.insert<scf::SCFDialect>();
registry.insert<func::FuncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertBufferizationToMemRefBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertComplexToLLVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertComplexToLLVMPassBase;
ConvertComplexToLLVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertComplexToLLVMPassBase(const ConvertComplexToLLVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertComplexToLLVMPassBase& operator=(const ConvertComplexToLLVMPassBase &) = delete;
ConvertComplexToLLVMPassBase(ConvertComplexToLLVMPassBase &&) = delete;
ConvertComplexToLLVMPassBase& operator=(ConvertComplexToLLVMPassBase &&) = delete;
~ConvertComplexToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-complex-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-complex-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert Complex dialect to LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertComplexToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertComplexToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertComplexToLLVMPassBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertComplexToLibmBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertComplexToLibmBase;
ConvertComplexToLibmBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertComplexToLibmBase(const ConvertComplexToLibmBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertComplexToLibmBase& operator=(const ConvertComplexToLibmBase &) = delete;
ConvertComplexToLibmBase(ConvertComplexToLibmBase &&) = delete;
ConvertComplexToLibmBase& operator=(ConvertComplexToLibmBase &&) = delete;
~ConvertComplexToLibmBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-complex-to-libm");
}
::llvm::StringRef getArgument() const override { return "convert-complex-to-libm"; }
::llvm::StringRef getDescription() const override { return "Convert Complex dialect to libm calls"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertComplexToLibm");
}
::llvm::StringRef getName() const override { return "ConvertComplexToLibm"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<func::FuncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertComplexToLibmBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertComplexToSPIRVPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertComplexToSPIRVPassBase;
ConvertComplexToSPIRVPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertComplexToSPIRVPassBase(const ConvertComplexToSPIRVPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertComplexToSPIRVPassBase& operator=(const ConvertComplexToSPIRVPassBase &) = delete;
ConvertComplexToSPIRVPassBase(ConvertComplexToSPIRVPassBase &&) = delete;
ConvertComplexToSPIRVPassBase& operator=(ConvertComplexToSPIRVPassBase &&) = delete;
~ConvertComplexToSPIRVPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-complex-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-complex-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert Complex dialect to SPIRV dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertComplexToSPIRVPass");
}
::llvm::StringRef getName() const override { return "ConvertComplexToSPIRVPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertComplexToSPIRVPassBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertComplexToStandardBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertComplexToStandardBase;
ConvertComplexToStandardBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertComplexToStandardBase(const ConvertComplexToStandardBase &other) : ::mlir::OperationPass<>(other) {}
ConvertComplexToStandardBase& operator=(const ConvertComplexToStandardBase &) = delete;
ConvertComplexToStandardBase(ConvertComplexToStandardBase &&) = delete;
ConvertComplexToStandardBase& operator=(ConvertComplexToStandardBase &&) = delete;
~ConvertComplexToStandardBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-complex-to-standard");
}
::llvm::StringRef getArgument() const override { return "convert-complex-to-standard"; }
::llvm::StringRef getDescription() const override { return "Convert Complex dialect to standard dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertComplexToStandard");
}
::llvm::StringRef getName() const override { return "ConvertComplexToStandard"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<math::MathDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertComplexToStandardBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertControlFlowToLLVMPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertControlFlowToLLVMPassBase;
ConvertControlFlowToLLVMPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertControlFlowToLLVMPassBase(const ConvertControlFlowToLLVMPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertControlFlowToLLVMPassBase& operator=(const ConvertControlFlowToLLVMPassBase &) = delete;
ConvertControlFlowToLLVMPassBase(ConvertControlFlowToLLVMPassBase &&) = delete;
ConvertControlFlowToLLVMPassBase& operator=(ConvertControlFlowToLLVMPassBase &&) = delete;
~ConvertControlFlowToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-cf-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-cf-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert ControlFlow operations to the LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertControlFlowToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertControlFlowToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertControlFlowToLLVMPassBase<DerivedT>)
protected:
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
};
template <typename DerivedT>
class ConvertControlFlowToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertControlFlowToSPIRVBase;
ConvertControlFlowToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertControlFlowToSPIRVBase(const ConvertControlFlowToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertControlFlowToSPIRVBase& operator=(const ConvertControlFlowToSPIRVBase &) = delete;
ConvertControlFlowToSPIRVBase(ConvertControlFlowToSPIRVBase &&) = delete;
ConvertControlFlowToSPIRVBase& operator=(ConvertControlFlowToSPIRVBase &&) = delete;
~ConvertControlFlowToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-cf-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-cf-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert ControlFlow dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertControlFlowToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertControlFlowToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertControlFlowToSPIRVBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> emulateLT32BitScalarTypes{*this, "emulate-lt-32-bit-scalar-types", ::llvm::cl::desc("Emulate narrower scalar types with 32-bit ones if not supported by the target"), ::llvm::cl::init(true)};
};
template <typename DerivedT>
class ConvertFuncToEmitCBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertFuncToEmitCBase;
ConvertFuncToEmitCBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertFuncToEmitCBase(const ConvertFuncToEmitCBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertFuncToEmitCBase& operator=(const ConvertFuncToEmitCBase &) = delete;
ConvertFuncToEmitCBase(ConvertFuncToEmitCBase &&) = delete;
ConvertFuncToEmitCBase& operator=(ConvertFuncToEmitCBase &&) = delete;
~ConvertFuncToEmitCBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-func-to-emitc");
}
::llvm::StringRef getArgument() const override { return "convert-func-to-emitc"; }
::llvm::StringRef getDescription() const override { return "Convert Func dialect to EmitC dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertFuncToEmitC");
}
::llvm::StringRef getName() const override { return "ConvertFuncToEmitC"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<emitc::EmitCDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertFuncToEmitCBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertFuncToLLVMPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertFuncToLLVMPassBase;
ConvertFuncToLLVMPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertFuncToLLVMPassBase(const ConvertFuncToLLVMPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertFuncToLLVMPassBase& operator=(const ConvertFuncToLLVMPassBase &) = delete;
ConvertFuncToLLVMPassBase(ConvertFuncToLLVMPassBase &&) = delete;
ConvertFuncToLLVMPassBase& operator=(ConvertFuncToLLVMPassBase &&) = delete;
~ConvertFuncToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-func-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-func-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert from the Func dialect to the LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertFuncToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertFuncToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertFuncToLLVMPassBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> useBarePtrCallConv{*this, "use-bare-ptr-memref-call-conv", ::llvm::cl::desc("Replace FuncOp's MemRef arguments with bare pointers to the MemRef element types"), ::llvm::cl::init(false)};
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
};
template <typename DerivedT>
class ConvertFuncToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertFuncToSPIRVBase;
ConvertFuncToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertFuncToSPIRVBase(const ConvertFuncToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertFuncToSPIRVBase& operator=(const ConvertFuncToSPIRVBase &) = delete;
ConvertFuncToSPIRVBase(ConvertFuncToSPIRVBase &&) = delete;
ConvertFuncToSPIRVBase& operator=(ConvertFuncToSPIRVBase &&) = delete;
~ConvertFuncToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-func-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-func-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert Func dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertFuncToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertFuncToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertFuncToSPIRVBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> emulateLT32BitScalarTypes{*this, "emulate-lt-32-bit-scalar-types", ::llvm::cl::desc("Emulate narrower scalar types with 32-bit ones if not supported by the target"), ::llvm::cl::init(true)};
};
template <typename DerivedT>
class ConvertGPUToSPIRVBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertGPUToSPIRVBase;
ConvertGPUToSPIRVBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertGPUToSPIRVBase(const ConvertGPUToSPIRVBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertGPUToSPIRVBase& operator=(const ConvertGPUToSPIRVBase &) = delete;
ConvertGPUToSPIRVBase(ConvertGPUToSPIRVBase &&) = delete;
ConvertGPUToSPIRVBase& operator=(ConvertGPUToSPIRVBase &&) = delete;
~ConvertGPUToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-gpu-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-gpu-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert GPU dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertGPUToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertGPUToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<func::FuncDialect>();
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertGPUToSPIRVBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> use64bitIndex{*this, "use-64bit-index", ::llvm::cl::desc("Use 64-bit integers to convert index types"), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class ConvertGpuLaunchFuncToVulkanLaunchFuncBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertGpuLaunchFuncToVulkanLaunchFuncBase;
ConvertGpuLaunchFuncToVulkanLaunchFuncBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertGpuLaunchFuncToVulkanLaunchFuncBase(const ConvertGpuLaunchFuncToVulkanLaunchFuncBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertGpuLaunchFuncToVulkanLaunchFuncBase& operator=(const ConvertGpuLaunchFuncToVulkanLaunchFuncBase &) = delete;
ConvertGpuLaunchFuncToVulkanLaunchFuncBase(ConvertGpuLaunchFuncToVulkanLaunchFuncBase &&) = delete;
ConvertGpuLaunchFuncToVulkanLaunchFuncBase& operator=(ConvertGpuLaunchFuncToVulkanLaunchFuncBase &&) = delete;
~ConvertGpuLaunchFuncToVulkanLaunchFuncBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-gpu-launch-to-vulkan-launch");
}
::llvm::StringRef getArgument() const override { return "convert-gpu-launch-to-vulkan-launch"; }
::llvm::StringRef getDescription() const override { return "Convert gpu.launch_func to vulkanLaunch external call"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertGpuLaunchFuncToVulkanLaunchFunc");
}
::llvm::StringRef getName() const override { return "ConvertGpuLaunchFuncToVulkanLaunchFunc"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertGpuLaunchFuncToVulkanLaunchFuncBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertGpuOpsToLLVMSPVOpsBase : public ::mlir::OperationPass<gpu::GPUModuleOp> {
public:
using Base = ConvertGpuOpsToLLVMSPVOpsBase;
ConvertGpuOpsToLLVMSPVOpsBase() : ::mlir::OperationPass<gpu::GPUModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertGpuOpsToLLVMSPVOpsBase(const ConvertGpuOpsToLLVMSPVOpsBase &other) : ::mlir::OperationPass<gpu::GPUModuleOp>(other) {}
ConvertGpuOpsToLLVMSPVOpsBase& operator=(const ConvertGpuOpsToLLVMSPVOpsBase &) = delete;
ConvertGpuOpsToLLVMSPVOpsBase(ConvertGpuOpsToLLVMSPVOpsBase &&) = delete;
ConvertGpuOpsToLLVMSPVOpsBase& operator=(ConvertGpuOpsToLLVMSPVOpsBase &&) = delete;
~ConvertGpuOpsToLLVMSPVOpsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-gpu-to-llvm-spv");
}
::llvm::StringRef getArgument() const override { return "convert-gpu-to-llvm-spv"; }
::llvm::StringRef getDescription() const override { return "Generate LLVM operations to be ingested by a SPIR-V backend for gpu operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertGpuOpsToLLVMSPVOps");
}
::llvm::StringRef getName() const override { return "ConvertGpuOpsToLLVMSPVOps"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertGpuOpsToLLVMSPVOpsBase<DerivedT>)
protected:
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
};
template <typename DerivedT>
class ConvertGpuOpsToNVVMOpsBase : public ::mlir::OperationPass<gpu::GPUModuleOp> {
public:
using Base = ConvertGpuOpsToNVVMOpsBase;
ConvertGpuOpsToNVVMOpsBase() : ::mlir::OperationPass<gpu::GPUModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertGpuOpsToNVVMOpsBase(const ConvertGpuOpsToNVVMOpsBase &other) : ::mlir::OperationPass<gpu::GPUModuleOp>(other) {}
ConvertGpuOpsToNVVMOpsBase& operator=(const ConvertGpuOpsToNVVMOpsBase &) = delete;
ConvertGpuOpsToNVVMOpsBase(ConvertGpuOpsToNVVMOpsBase &&) = delete;
ConvertGpuOpsToNVVMOpsBase& operator=(ConvertGpuOpsToNVVMOpsBase &&) = delete;
~ConvertGpuOpsToNVVMOpsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-gpu-to-nvvm");
}
::llvm::StringRef getArgument() const override { return "convert-gpu-to-nvvm"; }
::llvm::StringRef getDescription() const override { return "Generate NVVM operations for gpu operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertGpuOpsToNVVMOps");
}
::llvm::StringRef getName() const override { return "ConvertGpuOpsToNVVMOps"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<cf::ControlFlowDialect>();
registry.insert<memref::MemRefDialect>();
registry.insert<NVVM::NVVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertGpuOpsToNVVMOpsBase<DerivedT>)
protected:
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
::mlir::Pass::Option<bool> hasRedux{*this, "has-redux", ::llvm::cl::desc("Target gpu supports redux"), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> useBarePtrCallConv{*this, "use-bare-ptr-memref-call-conv", ::llvm::cl::desc("Replace memref arguments in GPU functions with bare pointers. All memrefs must have static shape."), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class ConvertGpuOpsToROCDLOpsBase : public ::mlir::OperationPass<gpu::GPUModuleOp> {
public:
using Base = ConvertGpuOpsToROCDLOpsBase;
ConvertGpuOpsToROCDLOpsBase() : ::mlir::OperationPass<gpu::GPUModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertGpuOpsToROCDLOpsBase(const ConvertGpuOpsToROCDLOpsBase &other) : ::mlir::OperationPass<gpu::GPUModuleOp>(other) {}
ConvertGpuOpsToROCDLOpsBase& operator=(const ConvertGpuOpsToROCDLOpsBase &) = delete;
ConvertGpuOpsToROCDLOpsBase(ConvertGpuOpsToROCDLOpsBase &&) = delete;
ConvertGpuOpsToROCDLOpsBase& operator=(ConvertGpuOpsToROCDLOpsBase &&) = delete;
~ConvertGpuOpsToROCDLOpsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-gpu-to-rocdl");
}
::llvm::StringRef getArgument() const override { return "convert-gpu-to-rocdl"; }
::llvm::StringRef getDescription() const override { return "Generate ROCDL operations for gpu operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertGpuOpsToROCDLOps");
}
::llvm::StringRef getName() const override { return "ConvertGpuOpsToROCDLOps"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<ROCDL::ROCDLDialect>();
registry.insert<cf::ControlFlowDialect>();
registry.insert<memref::MemRefDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertGpuOpsToROCDLOpsBase<DerivedT>)
protected:
::mlir::Pass::Option<std::string> chipset{*this, "chipset", ::llvm::cl::desc("Chipset that these operations will run on"), ::llvm::cl::init("gfx000")};
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
::mlir::Pass::Option<bool> useBarePtrCallConv{*this, "use-bare-ptr-memref-call-conv", ::llvm::cl::desc("Replace memref arguments in GPU functions with bare pointers.All memrefs must have static shape"), ::llvm::cl::init(false)};
::mlir::Pass::Option<::mlir::gpu::amd::Runtime> runtime{*this, "runtime", ::llvm::cl::desc("Runtime code will be run on (default is Unknown, can also use HIP or OpenCl)"), ::llvm::cl::init(::mlir::gpu::amd::Runtime::Unknown), ::llvm::cl::values(
clEnumValN(::mlir::gpu::amd::Runtime::Unknown, "unknown", "Unknown (default)"),
clEnumValN(::mlir::gpu::amd::Runtime::HIP, "HIP", "HIP"),
clEnumValN(::mlir::gpu::amd::Runtime::OpenCL, "OpenCL", "OpenCL")
)};
};
template <typename DerivedT>
class ConvertIndexToLLVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertIndexToLLVMPassBase;
ConvertIndexToLLVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertIndexToLLVMPassBase(const ConvertIndexToLLVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertIndexToLLVMPassBase& operator=(const ConvertIndexToLLVMPassBase &) = delete;
ConvertIndexToLLVMPassBase(ConvertIndexToLLVMPassBase &&) = delete;
ConvertIndexToLLVMPassBase& operator=(ConvertIndexToLLVMPassBase &&) = delete;
~ConvertIndexToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-index-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-index-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Lower the `index` dialect to the `llvm` dialect."; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertIndexToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertIndexToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<::mlir::LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertIndexToLLVMPassBase<DerivedT>)
protected:
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
};
template <typename DerivedT>
class ConvertIndexToSPIRVPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertIndexToSPIRVPassBase;
ConvertIndexToSPIRVPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertIndexToSPIRVPassBase(const ConvertIndexToSPIRVPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertIndexToSPIRVPassBase& operator=(const ConvertIndexToSPIRVPassBase &) = delete;
ConvertIndexToSPIRVPassBase(ConvertIndexToSPIRVPassBase &&) = delete;
ConvertIndexToSPIRVPassBase& operator=(ConvertIndexToSPIRVPassBase &&) = delete;
~ConvertIndexToSPIRVPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-index-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-index-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Lower the `index` dialect to the `spirv` dialect."; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertIndexToSPIRVPass");
}
::llvm::StringRef getName() const override { return "ConvertIndexToSPIRVPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<::mlir::spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertIndexToSPIRVPassBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> use64bitIndex{*this, "use-64bit-index", ::llvm::cl::desc("Use 64-bit integers to convert index types"), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class ConvertLinalgToStandardBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertLinalgToStandardBase;
ConvertLinalgToStandardBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertLinalgToStandardBase(const ConvertLinalgToStandardBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertLinalgToStandardBase& operator=(const ConvertLinalgToStandardBase &) = delete;
ConvertLinalgToStandardBase(ConvertLinalgToStandardBase &&) = delete;
ConvertLinalgToStandardBase& operator=(ConvertLinalgToStandardBase &&) = delete;
~ConvertLinalgToStandardBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-linalg-to-std");
}
::llvm::StringRef getArgument() const override { return "convert-linalg-to-std"; }
::llvm::StringRef getDescription() const override { return "Convert the operations from the linalg dialect into the Standard dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertLinalgToStandard");
}
::llvm::StringRef getName() const override { return "ConvertLinalgToStandard"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<func::FuncDialect>();
registry.insert<memref::MemRefDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertLinalgToStandardBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertMathToFuncsBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertMathToFuncsBase;
ConvertMathToFuncsBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMathToFuncsBase(const ConvertMathToFuncsBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertMathToFuncsBase& operator=(const ConvertMathToFuncsBase &) = delete;
ConvertMathToFuncsBase(ConvertMathToFuncsBase &&) = delete;
ConvertMathToFuncsBase& operator=(ConvertMathToFuncsBase &&) = delete;
~ConvertMathToFuncsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-math-to-funcs");
}
::llvm::StringRef getArgument() const override { return "convert-math-to-funcs"; }
::llvm::StringRef getDescription() const override { return "Convert Math operations to calls of outlined implementations."; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMathToFuncs");
}
::llvm::StringRef getName() const override { return "ConvertMathToFuncs"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
registry.insert<cf::ControlFlowDialect>();
registry.insert<func::FuncDialect>();
registry.insert<scf::SCFDialect>();
registry.insert<vector::VectorDialect>();
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMathToFuncsBase<DerivedT>)
protected:
::mlir::Pass::Option<unsigned> minWidthOfFPowIExponent{*this, "min-width-of-fpowi-exponent", ::llvm::cl::desc("Convert FPowI only if the width of its exponent's integer type is greater than or equal to this value"), ::llvm::cl::init(1)};
::mlir::Pass::Option<bool> convertCtlz{*this, "convert-ctlz", ::llvm::cl::desc("Convert math.ctlz to a software implementation. Enable for targets that do not natively support ctlz."), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class ConvertMathToLLVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertMathToLLVMPassBase;
ConvertMathToLLVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMathToLLVMPassBase(const ConvertMathToLLVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertMathToLLVMPassBase& operator=(const ConvertMathToLLVMPassBase &) = delete;
ConvertMathToLLVMPassBase(ConvertMathToLLVMPassBase &&) = delete;
ConvertMathToLLVMPassBase& operator=(ConvertMathToLLVMPassBase &&) = delete;
~ConvertMathToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-math-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-math-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert Math dialect to LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMathToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertMathToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMathToLLVMPassBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> approximateLog1p{*this, "approximate-log1p", ::llvm::cl::desc("Enable approximation of Log1p."), ::llvm::cl::init(true)};
};
template <typename DerivedT>
class ConvertMathToLibmBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertMathToLibmBase;
ConvertMathToLibmBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMathToLibmBase(const ConvertMathToLibmBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertMathToLibmBase& operator=(const ConvertMathToLibmBase &) = delete;
ConvertMathToLibmBase(ConvertMathToLibmBase &&) = delete;
ConvertMathToLibmBase& operator=(ConvertMathToLibmBase &&) = delete;
~ConvertMathToLibmBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-math-to-libm");
}
::llvm::StringRef getArgument() const override { return "convert-math-to-libm"; }
::llvm::StringRef getDescription() const override { return "Convert Math dialect to libm calls"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMathToLibm");
}
::llvm::StringRef getName() const override { return "ConvertMathToLibm"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
registry.insert<func::FuncDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMathToLibmBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertMathToROCDLBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertMathToROCDLBase;
ConvertMathToROCDLBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMathToROCDLBase(const ConvertMathToROCDLBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertMathToROCDLBase& operator=(const ConvertMathToROCDLBase &) = delete;
ConvertMathToROCDLBase(ConvertMathToROCDLBase &&) = delete;
ConvertMathToROCDLBase& operator=(ConvertMathToROCDLBase &&) = delete;
~ConvertMathToROCDLBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-math-to-rocdl");
}
::llvm::StringRef getArgument() const override { return "convert-math-to-rocdl"; }
::llvm::StringRef getDescription() const override { return "Convert Math dialect to ROCDL library calls"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMathToROCDL");
}
::llvm::StringRef getName() const override { return "ConvertMathToROCDL"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
registry.insert<func::FuncDialect>();
registry.insert<ROCDL::ROCDLDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMathToROCDLBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertMathToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertMathToSPIRVBase;
ConvertMathToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMathToSPIRVBase(const ConvertMathToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertMathToSPIRVBase& operator=(const ConvertMathToSPIRVBase &) = delete;
ConvertMathToSPIRVBase(ConvertMathToSPIRVBase &&) = delete;
ConvertMathToSPIRVBase& operator=(ConvertMathToSPIRVBase &&) = delete;
~ConvertMathToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-math-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-math-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert Math dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMathToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertMathToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMathToSPIRVBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertMemRefToEmitCBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertMemRefToEmitCBase;
ConvertMemRefToEmitCBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMemRefToEmitCBase(const ConvertMemRefToEmitCBase &other) : ::mlir::OperationPass<>(other) {}
ConvertMemRefToEmitCBase& operator=(const ConvertMemRefToEmitCBase &) = delete;
ConvertMemRefToEmitCBase(ConvertMemRefToEmitCBase &&) = delete;
ConvertMemRefToEmitCBase& operator=(ConvertMemRefToEmitCBase &&) = delete;
~ConvertMemRefToEmitCBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-memref-to-emitc");
}
::llvm::StringRef getArgument() const override { return "convert-memref-to-emitc"; }
::llvm::StringRef getDescription() const override { return "Convert MemRef dialect to EmitC dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMemRefToEmitC");
}
::llvm::StringRef getName() const override { return "ConvertMemRefToEmitC"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<emitc::EmitCDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMemRefToEmitCBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertMemRefToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertMemRefToSPIRVBase;
ConvertMemRefToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertMemRefToSPIRVBase(const ConvertMemRefToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertMemRefToSPIRVBase& operator=(const ConvertMemRefToSPIRVBase &) = delete;
ConvertMemRefToSPIRVBase(ConvertMemRefToSPIRVBase &&) = delete;
ConvertMemRefToSPIRVBase& operator=(ConvertMemRefToSPIRVBase &&) = delete;
~ConvertMemRefToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-memref-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-memref-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert MemRef dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertMemRefToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertMemRefToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertMemRefToSPIRVBase<DerivedT>)
protected:
::mlir::Pass::Option<int> boolNumBits{*this, "bool-num-bits", ::llvm::cl::desc("The number of bits to store a boolean value"), ::llvm::cl::init(8)};
::mlir::Pass::Option<bool> use64bitIndex{*this, "use-64bit-index", ::llvm::cl::desc("Use 64-bit integers to convert index types"), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class ConvertNVGPUToNVVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertNVGPUToNVVMPassBase;
ConvertNVGPUToNVVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertNVGPUToNVVMPassBase(const ConvertNVGPUToNVVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertNVGPUToNVVMPassBase& operator=(const ConvertNVGPUToNVVMPassBase &) = delete;
ConvertNVGPUToNVVMPassBase(ConvertNVGPUToNVVMPassBase &&) = delete;
ConvertNVGPUToNVVMPassBase& operator=(ConvertNVGPUToNVVMPassBase &&) = delete;
~ConvertNVGPUToNVVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-nvgpu-to-nvvm");
}
::llvm::StringRef getArgument() const override { return "convert-nvgpu-to-nvvm"; }
::llvm::StringRef getDescription() const override { return "Convert NVGPU dialect to NVVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertNVGPUToNVVMPass");
}
::llvm::StringRef getName() const override { return "ConvertNVGPUToNVVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<NVVM::NVVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertNVGPUToNVVMPassBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertNVVMToLLVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertNVVMToLLVMPassBase;
ConvertNVVMToLLVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertNVVMToLLVMPassBase(const ConvertNVVMToLLVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertNVVMToLLVMPassBase& operator=(const ConvertNVVMToLLVMPassBase &) = delete;
ConvertNVVMToLLVMPassBase(ConvertNVVMToLLVMPassBase &&) = delete;
ConvertNVVMToLLVMPassBase& operator=(ConvertNVVMToLLVMPassBase &&) = delete;
~ConvertNVVMToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-nvvm-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-nvvm-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert NVVM to PTX with Inline Assembly in LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertNVVMToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertNVVMToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<NVVM::NVVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertNVVMToLLVMPassBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertOpenACCToSCFBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertOpenACCToSCFBase;
ConvertOpenACCToSCFBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertOpenACCToSCFBase(const ConvertOpenACCToSCFBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertOpenACCToSCFBase& operator=(const ConvertOpenACCToSCFBase &) = delete;
ConvertOpenACCToSCFBase(ConvertOpenACCToSCFBase &&) = delete;
ConvertOpenACCToSCFBase& operator=(ConvertOpenACCToSCFBase &&) = delete;
~ConvertOpenACCToSCFBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-openacc-to-scf");
}
::llvm::StringRef getArgument() const override { return "convert-openacc-to-scf"; }
::llvm::StringRef getDescription() const override { return "Convert the OpenACC ops to OpenACC with SCF dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertOpenACCToSCF");
}
::llvm::StringRef getName() const override { return "ConvertOpenACCToSCF"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<scf::SCFDialect>();
registry.insert<acc::OpenACCDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertOpenACCToSCFBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertOpenMPToLLVMPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertOpenMPToLLVMPassBase;
ConvertOpenMPToLLVMPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertOpenMPToLLVMPassBase(const ConvertOpenMPToLLVMPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertOpenMPToLLVMPassBase& operator=(const ConvertOpenMPToLLVMPassBase &) = delete;
ConvertOpenMPToLLVMPassBase(ConvertOpenMPToLLVMPassBase &&) = delete;
ConvertOpenMPToLLVMPassBase& operator=(ConvertOpenMPToLLVMPassBase &&) = delete;
~ConvertOpenMPToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-openmp-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-openmp-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert the OpenMP ops to OpenMP ops with LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertOpenMPToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertOpenMPToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertOpenMPToLLVMPassBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertPDLToPDLInterpBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertPDLToPDLInterpBase;
ConvertPDLToPDLInterpBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertPDLToPDLInterpBase(const ConvertPDLToPDLInterpBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertPDLToPDLInterpBase& operator=(const ConvertPDLToPDLInterpBase &) = delete;
ConvertPDLToPDLInterpBase(ConvertPDLToPDLInterpBase &&) = delete;
ConvertPDLToPDLInterpBase& operator=(ConvertPDLToPDLInterpBase &&) = delete;
~ConvertPDLToPDLInterpBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-pdl-to-pdl-interp");
}
::llvm::StringRef getArgument() const override { return "convert-pdl-to-pdl-interp"; }
::llvm::StringRef getDescription() const override { return "Convert PDL ops to PDL interpreter ops"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertPDLToPDLInterp");
}
::llvm::StringRef getName() const override { return "ConvertPDLToPDLInterp"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<pdl_interp::PDLInterpDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertPDLToPDLInterpBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertParallelLoopToGpuBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertParallelLoopToGpuBase;
ConvertParallelLoopToGpuBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertParallelLoopToGpuBase(const ConvertParallelLoopToGpuBase &other) : ::mlir::OperationPass<>(other) {}
ConvertParallelLoopToGpuBase& operator=(const ConvertParallelLoopToGpuBase &) = delete;
ConvertParallelLoopToGpuBase(ConvertParallelLoopToGpuBase &&) = delete;
ConvertParallelLoopToGpuBase& operator=(ConvertParallelLoopToGpuBase &&) = delete;
~ConvertParallelLoopToGpuBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-parallel-loops-to-gpu");
}
::llvm::StringRef getArgument() const override { return "convert-parallel-loops-to-gpu"; }
::llvm::StringRef getDescription() const override { return "Convert mapped scf.parallel ops to gpu launch operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertParallelLoopToGpu");
}
::llvm::StringRef getName() const override { return "ConvertParallelLoopToGpu"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<affine::AffineDialect>();
registry.insert<gpu::GPUDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertParallelLoopToGpuBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertSCFToOpenMPPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertSCFToOpenMPPassBase;
ConvertSCFToOpenMPPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertSCFToOpenMPPassBase(const ConvertSCFToOpenMPPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertSCFToOpenMPPassBase& operator=(const ConvertSCFToOpenMPPassBase &) = delete;
ConvertSCFToOpenMPPassBase(ConvertSCFToOpenMPPassBase &&) = delete;
ConvertSCFToOpenMPPassBase& operator=(ConvertSCFToOpenMPPassBase &&) = delete;
~ConvertSCFToOpenMPPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-scf-to-openmp");
}
::llvm::StringRef getArgument() const override { return "convert-scf-to-openmp"; }
::llvm::StringRef getDescription() const override { return "Convert SCF parallel loop to OpenMP parallel + workshare constructs."; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertSCFToOpenMPPass");
}
::llvm::StringRef getName() const override { return "ConvertSCFToOpenMPPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<omp::OpenMPDialect>();
registry.insert<LLVM::LLVMDialect>();
registry.insert<memref::MemRefDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertSCFToOpenMPPassBase<DerivedT>)
protected:
::mlir::Pass::Option<unsigned> numThreads{*this, "num-threads", ::llvm::cl::desc("Number of threads to use"), ::llvm::cl::init(0)};
};
template <typename DerivedT>
class ConvertSPIRVToLLVMPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertSPIRVToLLVMPassBase;
ConvertSPIRVToLLVMPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertSPIRVToLLVMPassBase(const ConvertSPIRVToLLVMPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertSPIRVToLLVMPassBase& operator=(const ConvertSPIRVToLLVMPassBase &) = delete;
ConvertSPIRVToLLVMPassBase(ConvertSPIRVToLLVMPassBase &&) = delete;
ConvertSPIRVToLLVMPassBase& operator=(ConvertSPIRVToLLVMPassBase &&) = delete;
~ConvertSPIRVToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-spirv-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-spirv-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert SPIR-V dialect to LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertSPIRVToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertSPIRVToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertSPIRVToLLVMPassBase<DerivedT>)
protected:
::mlir::Pass::Option<::mlir::spirv::ClientAPI> clientAPI{*this, "client-api", ::llvm::cl::desc("Derive StorageClass to address space mapping from the client API"), ::llvm::cl::init(::mlir::spirv::ClientAPI::Unknown), ::llvm::cl::values(
clEnumValN(::mlir::spirv::ClientAPI::Unknown, "Unknown", "Unknown (default)"),
clEnumValN(::mlir::spirv::ClientAPI::Metal, "Metal", "Metal"),
clEnumValN(::mlir::spirv::ClientAPI::OpenCL, "OpenCL", "OpenCL"),
clEnumValN(::mlir::spirv::ClientAPI::Vulkan, "Vulkan", "Vulkan"),
clEnumValN(::mlir::spirv::ClientAPI::WebGPU, "WebGPU", "WebGPU")
)};
};
template <typename DerivedT>
class ConvertShapeConstraintsBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertShapeConstraintsBase;
ConvertShapeConstraintsBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertShapeConstraintsBase(const ConvertShapeConstraintsBase &other) : ::mlir::OperationPass<>(other) {}
ConvertShapeConstraintsBase& operator=(const ConvertShapeConstraintsBase &) = delete;
ConvertShapeConstraintsBase(ConvertShapeConstraintsBase &&) = delete;
ConvertShapeConstraintsBase& operator=(ConvertShapeConstraintsBase &&) = delete;
~ConvertShapeConstraintsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-shape-constraints");
}
::llvm::StringRef getArgument() const override { return "convert-shape-constraints"; }
::llvm::StringRef getDescription() const override { return "Convert shape constraint operations to the standard dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertShapeConstraints");
}
::llvm::StringRef getName() const override { return "ConvertShapeConstraints"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<cf::ControlFlowDialect>();
registry.insert<scf::SCFDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertShapeConstraintsBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertShapeToStandardBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertShapeToStandardBase;
ConvertShapeToStandardBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertShapeToStandardBase(const ConvertShapeToStandardBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertShapeToStandardBase& operator=(const ConvertShapeToStandardBase &) = delete;
ConvertShapeToStandardBase(ConvertShapeToStandardBase &&) = delete;
ConvertShapeToStandardBase& operator=(ConvertShapeToStandardBase &&) = delete;
~ConvertShapeToStandardBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-shape-to-std");
}
::llvm::StringRef getArgument() const override { return "convert-shape-to-std"; }
::llvm::StringRef getDescription() const override { return "Convert operations from the shape dialect into the standard dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertShapeToStandard");
}
::llvm::StringRef getName() const override { return "ConvertShapeToStandard"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<scf::SCFDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertShapeToStandardBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertTensorToLinalgBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertTensorToLinalgBase;
ConvertTensorToLinalgBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertTensorToLinalgBase(const ConvertTensorToLinalgBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertTensorToLinalgBase& operator=(const ConvertTensorToLinalgBase &) = delete;
ConvertTensorToLinalgBase(ConvertTensorToLinalgBase &&) = delete;
ConvertTensorToLinalgBase& operator=(ConvertTensorToLinalgBase &&) = delete;
~ConvertTensorToLinalgBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-tensor-to-linalg");
}
::llvm::StringRef getArgument() const override { return "convert-tensor-to-linalg"; }
::llvm::StringRef getDescription() const override { return "Convert some Tensor dialect ops to Linalg dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertTensorToLinalg");
}
::llvm::StringRef getName() const override { return "ConvertTensorToLinalg"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
registry.insert<linalg::LinalgDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertTensorToLinalgBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertTensorToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertTensorToSPIRVBase;
ConvertTensorToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertTensorToSPIRVBase(const ConvertTensorToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertTensorToSPIRVBase& operator=(const ConvertTensorToSPIRVBase &) = delete;
ConvertTensorToSPIRVBase(ConvertTensorToSPIRVBase &&) = delete;
ConvertTensorToSPIRVBase& operator=(ConvertTensorToSPIRVBase &&) = delete;
~ConvertTensorToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-tensor-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-tensor-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert Tensor dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertTensorToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertTensorToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertTensorToSPIRVBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> emulateLT32BitScalarTypes{*this, "emulate-lt-32-bit-scalar-types", ::llvm::cl::desc("Emulate narrower scalar types with 32-bit ones if not supported by the target"), ::llvm::cl::init(true)};
};
template <typename DerivedT>
class ConvertToLLVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertToLLVMPassBase;
ConvertToLLVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertToLLVMPassBase(const ConvertToLLVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertToLLVMPassBase& operator=(const ConvertToLLVMPassBase &) = delete;
ConvertToLLVMPassBase(ConvertToLLVMPassBase &&) = delete;
ConvertToLLVMPassBase& operator=(ConvertToLLVMPassBase &&) = delete;
~ConvertToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert to LLVM via dialect interfaces found in the input IR"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertToLLVMPassBase<DerivedT>)
protected:
::mlir::Pass::ListOption<std::string> filterDialects{*this, "filter-dialects", ::llvm::cl::desc("Test conversion patterns of only the specified dialects")};
};
template <typename DerivedT>
class ConvertToSPIRVPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertToSPIRVPassBase;
ConvertToSPIRVPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertToSPIRVPassBase(const ConvertToSPIRVPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertToSPIRVPassBase& operator=(const ConvertToSPIRVPassBase &) = delete;
ConvertToSPIRVPassBase(ConvertToSPIRVPassBase &&) = delete;
ConvertToSPIRVPassBase& operator=(ConvertToSPIRVPassBase &&) = delete;
~ConvertToSPIRVPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert to SPIR-V"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertToSPIRVPass");
}
::llvm::StringRef getName() const override { return "ConvertToSPIRVPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertToSPIRVPassBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> runSignatureConversion{*this, "run-signature-conversion", ::llvm::cl::desc("Run function signature conversion to convert vector types"), ::llvm::cl::init(true)};
::mlir::Pass::Option<bool> runVectorUnrolling{*this, "run-vector-unrolling", ::llvm::cl::desc("Run vector unrolling to convert vector types in function bodies"), ::llvm::cl::init(true)};
::mlir::Pass::Option<bool> convertGPUModules{*this, "convert-gpu-modules", ::llvm::cl::desc("Clone and convert GPU modules"), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class ConvertVectorToArmSMEBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertVectorToArmSMEBase;
ConvertVectorToArmSMEBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVectorToArmSMEBase(const ConvertVectorToArmSMEBase &other) : ::mlir::OperationPass<>(other) {}
ConvertVectorToArmSMEBase& operator=(const ConvertVectorToArmSMEBase &) = delete;
ConvertVectorToArmSMEBase(ConvertVectorToArmSMEBase &&) = delete;
ConvertVectorToArmSMEBase& operator=(ConvertVectorToArmSMEBase &&) = delete;
~ConvertVectorToArmSMEBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-vector-to-arm-sme");
}
::llvm::StringRef getArgument() const override { return "convert-vector-to-arm-sme"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the vector dialect into the ArmSME dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVectorToArmSME");
}
::llvm::StringRef getName() const override { return "ConvertVectorToArmSME"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arm_sme::ArmSMEDialect>();
registry.insert<arm_sve::ArmSVEDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVectorToArmSMEBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertVectorToGPUBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertVectorToGPUBase;
ConvertVectorToGPUBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVectorToGPUBase(const ConvertVectorToGPUBase &other) : ::mlir::OperationPass<>(other) {}
ConvertVectorToGPUBase& operator=(const ConvertVectorToGPUBase &) = delete;
ConvertVectorToGPUBase(ConvertVectorToGPUBase &&) = delete;
ConvertVectorToGPUBase& operator=(ConvertVectorToGPUBase &&) = delete;
~ConvertVectorToGPUBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-vector-to-gpu");
}
::llvm::StringRef getArgument() const override { return "convert-vector-to-gpu"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the vector dialect into the GPU dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVectorToGPU");
}
::llvm::StringRef getName() const override { return "ConvertVectorToGPU"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<memref::MemRefDialect>();
registry.insert<gpu::GPUDialect>();
registry.insert<affine::AffineDialect>();
registry.insert<vector::VectorDialect>();
registry.insert<nvgpu::NVGPUDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVectorToGPUBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> useNvGpu{*this, "use-nvgpu", ::llvm::cl::desc("convert to NvGPU ops instead of GPU dialect ops"), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class ConvertVectorToLLVMPassBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertVectorToLLVMPassBase;
ConvertVectorToLLVMPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVectorToLLVMPassBase(const ConvertVectorToLLVMPassBase &other) : ::mlir::OperationPass<>(other) {}
ConvertVectorToLLVMPassBase& operator=(const ConvertVectorToLLVMPassBase &) = delete;
ConvertVectorToLLVMPassBase(ConvertVectorToLLVMPassBase &&) = delete;
ConvertVectorToLLVMPassBase& operator=(ConvertVectorToLLVMPassBase &&) = delete;
~ConvertVectorToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-vector-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-vector-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the vector dialect into the LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVectorToLLVMPass");
}
::llvm::StringRef getName() const override { return "ConvertVectorToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVectorToLLVMPassBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> reassociateFPReductions{*this, "reassociate-fp-reductions", ::llvm::cl::desc("Allows llvm to reassociate floating-point reductions for speed"), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> force32BitVectorIndices{*this, "force-32bit-vector-indices", ::llvm::cl::desc("Allows compiler to assume vector indices fit in 32-bit if that yields faster code"), ::llvm::cl::init(true)};
::mlir::Pass::Option<bool> amx{*this, "enable-amx", ::llvm::cl::desc("Enables the use of AMX dialect while lowering the vector dialect."), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> armNeon{*this, "enable-arm-neon", ::llvm::cl::desc("Enables the use of ArmNeon dialect while lowering the vector dialect."), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> armSVE{*this, "enable-arm-sve", ::llvm::cl::desc("Enables the use of ArmSVE dialect while lowering the vector dialect."), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> x86Vector{*this, "enable-x86vector", ::llvm::cl::desc("Enables the use of X86Vector dialect while lowering the vector dialect."), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class ConvertVectorToSCFBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertVectorToSCFBase;
ConvertVectorToSCFBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVectorToSCFBase(const ConvertVectorToSCFBase &other) : ::mlir::OperationPass<>(other) {}
ConvertVectorToSCFBase& operator=(const ConvertVectorToSCFBase &) = delete;
ConvertVectorToSCFBase(ConvertVectorToSCFBase &&) = delete;
ConvertVectorToSCFBase& operator=(ConvertVectorToSCFBase &&) = delete;
~ConvertVectorToSCFBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-vector-to-scf");
}
::llvm::StringRef getArgument() const override { return "convert-vector-to-scf"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the vector dialect into the SCF dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVectorToSCF");
}
::llvm::StringRef getName() const override { return "ConvertVectorToSCF"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<affine::AffineDialect>();
registry.insert<memref::MemRefDialect>();
registry.insert<scf::SCFDialect>();
registry.insert<tensor::TensorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVectorToSCFBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> fullUnroll{*this, "full-unroll", ::llvm::cl::desc("Perform full unrolling when converting vector transfers to SCF"), ::llvm::cl::init(false)};
::mlir::Pass::Option<unsigned> targetRank{*this, "target-rank", ::llvm::cl::desc("Target vector rank to which transfer ops should be lowered"), ::llvm::cl::init(1)};
::mlir::Pass::Option<bool> lowerTensors{*this, "lower-tensors", ::llvm::cl::desc("Lower transfer ops that operate on tensors"), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> lowerScalable{*this, "lower-scalable", ::llvm::cl::desc("Add scalable vector specific lowerings (that introduce loops)"), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class ConvertVectorToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertVectorToSPIRVBase;
ConvertVectorToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVectorToSPIRVBase(const ConvertVectorToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
ConvertVectorToSPIRVBase& operator=(const ConvertVectorToSPIRVBase &) = delete;
ConvertVectorToSPIRVBase(ConvertVectorToSPIRVBase &&) = delete;
ConvertVectorToSPIRVBase& operator=(ConvertVectorToSPIRVBase &&) = delete;
~ConvertVectorToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-vector-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-vector-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert Vector dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVectorToSPIRV");
}
::llvm::StringRef getName() const override { return "ConvertVectorToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVectorToSPIRVBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertVectorToXeGPUBase : public ::mlir::OperationPass<> {
public:
using Base = ConvertVectorToXeGPUBase;
ConvertVectorToXeGPUBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVectorToXeGPUBase(const ConvertVectorToXeGPUBase &other) : ::mlir::OperationPass<>(other) {}
ConvertVectorToXeGPUBase& operator=(const ConvertVectorToXeGPUBase &) = delete;
ConvertVectorToXeGPUBase(ConvertVectorToXeGPUBase &&) = delete;
ConvertVectorToXeGPUBase& operator=(ConvertVectorToXeGPUBase &&) = delete;
~ConvertVectorToXeGPUBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-vector-to-xegpu");
}
::llvm::StringRef getArgument() const override { return "convert-vector-to-xegpu"; }
::llvm::StringRef getDescription() const override { return "Lower the operations from the vector dialect into the XeGPU dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVectorToXeGPU");
}
::llvm::StringRef getName() const override { return "ConvertVectorToXeGPU"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<memref::MemRefDialect>();
registry.insert<arith::ArithDialect>();
registry.insert<vector::VectorDialect>();
registry.insert<xegpu::XeGPUDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVectorToXeGPUBase<DerivedT>)
protected:
};
template <typename DerivedT>
class ConvertVulkanLaunchFuncToVulkanCallsPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = ConvertVulkanLaunchFuncToVulkanCallsPassBase;
ConvertVulkanLaunchFuncToVulkanCallsPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
ConvertVulkanLaunchFuncToVulkanCallsPassBase(const ConvertVulkanLaunchFuncToVulkanCallsPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
ConvertVulkanLaunchFuncToVulkanCallsPassBase& operator=(const ConvertVulkanLaunchFuncToVulkanCallsPassBase &) = delete;
ConvertVulkanLaunchFuncToVulkanCallsPassBase(ConvertVulkanLaunchFuncToVulkanCallsPassBase &&) = delete;
ConvertVulkanLaunchFuncToVulkanCallsPassBase& operator=(ConvertVulkanLaunchFuncToVulkanCallsPassBase &&) = delete;
~ConvertVulkanLaunchFuncToVulkanCallsPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("launch-func-to-vulkan");
}
::llvm::StringRef getArgument() const override { return "launch-func-to-vulkan"; }
::llvm::StringRef getDescription() const override { return "Convert vulkanLaunch external call to Vulkan runtime external calls"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ConvertVulkanLaunchFuncToVulkanCallsPass");
}
::llvm::StringRef getName() const override { return "ConvertVulkanLaunchFuncToVulkanCallsPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvertVulkanLaunchFuncToVulkanCallsPassBase<DerivedT>)
protected:
};
template <typename DerivedT>
class FinalizeMemRefToLLVMConversionPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = FinalizeMemRefToLLVMConversionPassBase;
FinalizeMemRefToLLVMConversionPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
FinalizeMemRefToLLVMConversionPassBase(const FinalizeMemRefToLLVMConversionPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
FinalizeMemRefToLLVMConversionPassBase& operator=(const FinalizeMemRefToLLVMConversionPassBase &) = delete;
FinalizeMemRefToLLVMConversionPassBase(FinalizeMemRefToLLVMConversionPassBase &&) = delete;
FinalizeMemRefToLLVMConversionPassBase& operator=(FinalizeMemRefToLLVMConversionPassBase &&) = delete;
~FinalizeMemRefToLLVMConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("finalize-memref-to-llvm");
}
::llvm::StringRef getArgument() const override { return "finalize-memref-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Finalize MemRef dialect to LLVM dialect conversion"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("FinalizeMemRefToLLVMConversionPass");
}
::llvm::StringRef getName() const override { return "FinalizeMemRefToLLVMConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(FinalizeMemRefToLLVMConversionPassBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> useAlignedAlloc{*this, "use-aligned-alloc", ::llvm::cl::desc("Use aligned_alloc in place of malloc for heap allocations"), ::llvm::cl::init(false)};
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
::mlir::Pass::Option<bool> useGenericFunctions{*this, "use-generic-functions", ::llvm::cl::desc("Use generic allocation and deallocation functions instead of the classic 'malloc', 'aligned_alloc' and 'free' functions"), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class GpuToLLVMConversionPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = GpuToLLVMConversionPassBase;
GpuToLLVMConversionPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
GpuToLLVMConversionPassBase(const GpuToLLVMConversionPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
GpuToLLVMConversionPassBase& operator=(const GpuToLLVMConversionPassBase &) = delete;
GpuToLLVMConversionPassBase(GpuToLLVMConversionPassBase &&) = delete;
GpuToLLVMConversionPassBase& operator=(GpuToLLVMConversionPassBase &&) = delete;
~GpuToLLVMConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("gpu-to-llvm");
}
::llvm::StringRef getArgument() const override { return "gpu-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert GPU dialect to LLVM dialect with GPU runtime calls"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("GpuToLLVMConversionPass");
}
::llvm::StringRef getName() const override { return "GpuToLLVMConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
registry.insert<memref::MemRefDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(GpuToLLVMConversionPassBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> hostBarePtrCallConv{*this, "use-bare-pointers-for-host", ::llvm::cl::desc("Use bare pointers to pass memref arguments to host functions. All memrefs must have static shape."), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> kernelBarePtrCallConv{*this, "use-bare-pointers-for-kernels", ::llvm::cl::desc("Use bare pointers to pass memref arguments to kernels. The kernel must use the same setting for this option."), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class LiftControlFlowToSCFPassBase : public ::mlir::OperationPass<> {
public:
using Base = LiftControlFlowToSCFPassBase;
LiftControlFlowToSCFPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
LiftControlFlowToSCFPassBase(const LiftControlFlowToSCFPassBase &other) : ::mlir::OperationPass<>(other) {}
LiftControlFlowToSCFPassBase& operator=(const LiftControlFlowToSCFPassBase &) = delete;
LiftControlFlowToSCFPassBase(LiftControlFlowToSCFPassBase &&) = delete;
LiftControlFlowToSCFPassBase& operator=(LiftControlFlowToSCFPassBase &&) = delete;
~LiftControlFlowToSCFPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("lift-cf-to-scf");
}
::llvm::StringRef getArgument() const override { return "lift-cf-to-scf"; }
::llvm::StringRef getDescription() const override { return "Lift ControlFlow dialect to SCF dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("LiftControlFlowToSCFPass");
}
::llvm::StringRef getName() const override { return "LiftControlFlowToSCFPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<scf::SCFDialect>();
registry.insert<arith::ArithDialect>();
registry.insert<ub::UBDialect>();
registry.insert<func::FuncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(LiftControlFlowToSCFPassBase<DerivedT>)
protected:
};
template <typename DerivedT>
class LowerHostCodeToLLVMPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = LowerHostCodeToLLVMPassBase;
LowerHostCodeToLLVMPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
LowerHostCodeToLLVMPassBase(const LowerHostCodeToLLVMPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
LowerHostCodeToLLVMPassBase& operator=(const LowerHostCodeToLLVMPassBase &) = delete;
LowerHostCodeToLLVMPassBase(LowerHostCodeToLLVMPassBase &&) = delete;
LowerHostCodeToLLVMPassBase& operator=(LowerHostCodeToLLVMPassBase &&) = delete;
~LowerHostCodeToLLVMPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("lower-host-to-llvm");
}
::llvm::StringRef getArgument() const override { return "lower-host-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Lowers the host module code and `gpu.launch_func` to LLVM"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("LowerHostCodeToLLVMPass");
}
::llvm::StringRef getName() const override { return "LowerHostCodeToLLVMPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(LowerHostCodeToLLVMPassBase<DerivedT>)
protected:
};
template <typename DerivedT>
class MapMemRefStorageClassBase : public ::mlir::OperationPass<> {
public:
using Base = MapMemRefStorageClassBase;
MapMemRefStorageClassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
MapMemRefStorageClassBase(const MapMemRefStorageClassBase &other) : ::mlir::OperationPass<>(other) {}
MapMemRefStorageClassBase& operator=(const MapMemRefStorageClassBase &) = delete;
MapMemRefStorageClassBase(MapMemRefStorageClassBase &&) = delete;
MapMemRefStorageClassBase& operator=(MapMemRefStorageClassBase &&) = delete;
~MapMemRefStorageClassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("map-memref-spirv-storage-class");
}
::llvm::StringRef getArgument() const override { return "map-memref-spirv-storage-class"; }
::llvm::StringRef getDescription() const override { return "Map numeric MemRef memory spaces to SPIR-V storage classes"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("MapMemRefStorageClass");
}
::llvm::StringRef getName() const override { return "MapMemRefStorageClass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(MapMemRefStorageClassBase<DerivedT>)
protected:
::mlir::Pass::Option<std::string> clientAPI{*this, "client-api", ::llvm::cl::desc("The client API to use for populating mappings"), ::llvm::cl::init("vulkan")};
};
template <typename DerivedT>
class ReconcileUnrealizedCastsBase : public ::mlir::OperationPass<> {
public:
using Base = ReconcileUnrealizedCastsBase;
ReconcileUnrealizedCastsBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
ReconcileUnrealizedCastsBase(const ReconcileUnrealizedCastsBase &other) : ::mlir::OperationPass<>(other) {}
ReconcileUnrealizedCastsBase& operator=(const ReconcileUnrealizedCastsBase &) = delete;
ReconcileUnrealizedCastsBase(ReconcileUnrealizedCastsBase &&) = delete;
ReconcileUnrealizedCastsBase& operator=(ReconcileUnrealizedCastsBase &&) = delete;
~ReconcileUnrealizedCastsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("reconcile-unrealized-casts");
}
::llvm::StringRef getArgument() const override { return "reconcile-unrealized-casts"; }
::llvm::StringRef getDescription() const override { return "Simplify and eliminate unrealized conversion casts"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("ReconcileUnrealizedCasts");
}
::llvm::StringRef getName() const override { return "ReconcileUnrealizedCasts"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ReconcileUnrealizedCastsBase<DerivedT>)
protected:
};
template <typename DerivedT>
class SCFToControlFlowBase : public ::mlir::OperationPass<> {
public:
using Base = SCFToControlFlowBase;
SCFToControlFlowBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
SCFToControlFlowBase(const SCFToControlFlowBase &other) : ::mlir::OperationPass<>(other) {}
SCFToControlFlowBase& operator=(const SCFToControlFlowBase &) = delete;
SCFToControlFlowBase(SCFToControlFlowBase &&) = delete;
SCFToControlFlowBase& operator=(SCFToControlFlowBase &&) = delete;
~SCFToControlFlowBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-scf-to-cf");
}
::llvm::StringRef getArgument() const override { return "convert-scf-to-cf"; }
::llvm::StringRef getDescription() const override { return "Convert SCF dialect to ControlFlow dialect, replacing structured control flow with a CFG"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SCFToControlFlow");
}
::llvm::StringRef getName() const override { return "SCFToControlFlow"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<cf::ControlFlowDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SCFToControlFlowBase<DerivedT>)
protected:
};
template <typename DerivedT>
class SCFToEmitCBase : public ::mlir::OperationPass<> {
public:
using Base = SCFToEmitCBase;
SCFToEmitCBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
SCFToEmitCBase(const SCFToEmitCBase &other) : ::mlir::OperationPass<>(other) {}
SCFToEmitCBase& operator=(const SCFToEmitCBase &) = delete;
SCFToEmitCBase(SCFToEmitCBase &&) = delete;
SCFToEmitCBase& operator=(SCFToEmitCBase &&) = delete;
~SCFToEmitCBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-scf-to-emitc");
}
::llvm::StringRef getArgument() const override { return "convert-scf-to-emitc"; }
::llvm::StringRef getDescription() const override { return "Convert SCF dialect to EmitC dialect, maintaining structured control flow"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SCFToEmitC");
}
::llvm::StringRef getName() const override { return "SCFToEmitC"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<emitc::EmitCDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SCFToEmitCBase<DerivedT>)
protected:
};
template <typename DerivedT>
class SCFToSPIRVBase : public ::mlir::OperationPass<> {
public:
using Base = SCFToSPIRVBase;
SCFToSPIRVBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
SCFToSPIRVBase(const SCFToSPIRVBase &other) : ::mlir::OperationPass<>(other) {}
SCFToSPIRVBase& operator=(const SCFToSPIRVBase &) = delete;
SCFToSPIRVBase(SCFToSPIRVBase &&) = delete;
SCFToSPIRVBase& operator=(SCFToSPIRVBase &&) = delete;
~SCFToSPIRVBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-scf-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-scf-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert SCF dialect to SPIR-V dialect."; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SCFToSPIRV");
}
::llvm::StringRef getName() const override { return "SCFToSPIRV"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SCFToSPIRVBase<DerivedT>)
protected:
};
template <typename DerivedT>
class SetLLVMModuleDataLayoutPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = SetLLVMModuleDataLayoutPassBase;
SetLLVMModuleDataLayoutPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
SetLLVMModuleDataLayoutPassBase(const SetLLVMModuleDataLayoutPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
SetLLVMModuleDataLayoutPassBase& operator=(const SetLLVMModuleDataLayoutPassBase &) = delete;
SetLLVMModuleDataLayoutPassBase(SetLLVMModuleDataLayoutPassBase &&) = delete;
SetLLVMModuleDataLayoutPassBase& operator=(SetLLVMModuleDataLayoutPassBase &&) = delete;
~SetLLVMModuleDataLayoutPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("set-llvm-module-datalayout");
}
::llvm::StringRef getArgument() const override { return "set-llvm-module-datalayout"; }
::llvm::StringRef getDescription() const override { return "Attach a datalayout string as a module attribute"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SetLLVMModuleDataLayoutPass");
}
::llvm::StringRef getName() const override { return "SetLLVMModuleDataLayoutPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SetLLVMModuleDataLayoutPassBase<DerivedT>)
protected:
::mlir::Pass::Option<std::string> dataLayout{*this, "data-layout", ::llvm::cl::desc("String description (LLVM format) of the data layout that is expected on the produced module"), ::llvm::cl::init("")};
};
template <typename DerivedT>
class TosaToArithBase : public ::mlir::OperationPass<> {
public:
using Base = TosaToArithBase;
TosaToArithBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
TosaToArithBase(const TosaToArithBase &other) : ::mlir::OperationPass<>(other) {}
TosaToArithBase& operator=(const TosaToArithBase &) = delete;
TosaToArithBase(TosaToArithBase &&) = delete;
TosaToArithBase& operator=(TosaToArithBase &&) = delete;
~TosaToArithBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("tosa-to-arith");
}
::llvm::StringRef getArgument() const override { return "tosa-to-arith"; }
::llvm::StringRef getDescription() const override { return "Lower TOSA to the Arith dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("TosaToArith");
}
::llvm::StringRef getName() const override { return "TosaToArith"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<arith::ArithDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TosaToArithBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> includeApplyRescale{*this, "include-apply-rescale", ::llvm::cl::desc("Whether to include the lowering for tosa.apply_rescale to arith"), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> use32Bit{*this, "use-32-bit", ::llvm::cl::desc("Whether to prioritze lowering to 32-bit operations"), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class TosaToLinalgBase : public ::mlir::InterfacePass<FunctionOpInterface> {
public:
using Base = TosaToLinalgBase;
TosaToLinalgBase() : ::mlir::InterfacePass<FunctionOpInterface>(::mlir::TypeID::get<DerivedT>()) {}
TosaToLinalgBase(const TosaToLinalgBase &other) : ::mlir::InterfacePass<FunctionOpInterface>(other) {}
TosaToLinalgBase& operator=(const TosaToLinalgBase &) = delete;
TosaToLinalgBase(TosaToLinalgBase &&) = delete;
TosaToLinalgBase& operator=(TosaToLinalgBase &&) = delete;
~TosaToLinalgBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("tosa-to-linalg");
}
::llvm::StringRef getArgument() const override { return "tosa-to-linalg"; }
::llvm::StringRef getDescription() const override { return "Lower TOSA to LinAlg on tensors"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("TosaToLinalg");
}
::llvm::StringRef getName() const override { return "TosaToLinalg"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TosaToLinalgBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> disableTosaDecompositions{*this, "disable-tosa-decompositions", ::llvm::cl::desc("Disable tosa decompositions pass"), ::llvm::cl::init(false)};
::mlir::Pass::Option<bool> aggressiveReduceConstant{*this, "aggressive-reduce-constant", ::llvm::cl::desc("Always perform the reduce constant optimization"), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class TosaToLinalgNamedBase : public ::mlir::InterfacePass<FunctionOpInterface> {
public:
using Base = TosaToLinalgNamedBase;
TosaToLinalgNamedBase() : ::mlir::InterfacePass<FunctionOpInterface>(::mlir::TypeID::get<DerivedT>()) {}
TosaToLinalgNamedBase(const TosaToLinalgNamedBase &other) : ::mlir::InterfacePass<FunctionOpInterface>(other) {}
TosaToLinalgNamedBase& operator=(const TosaToLinalgNamedBase &) = delete;
TosaToLinalgNamedBase(TosaToLinalgNamedBase &&) = delete;
TosaToLinalgNamedBase& operator=(TosaToLinalgNamedBase &&) = delete;
~TosaToLinalgNamedBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("tosa-to-linalg-named");
}
::llvm::StringRef getArgument() const override { return "tosa-to-linalg-named"; }
::llvm::StringRef getDescription() const override { return "Lower TOSA to LinAlg named operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("TosaToLinalgNamed");
}
::llvm::StringRef getName() const override { return "TosaToLinalgNamed"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TosaToLinalgNamedBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> preferConv2DKernelLayoutHWCF{*this, "prefer-conv2d-kernel-layout-hwcf", ::llvm::cl::desc("Prefer generating linalg.conv_2d_nhwc_hwcf over linalg.conv_2d_nhwc_fhwc"), ::llvm::cl::init(false)};
};
template <typename DerivedT>
class TosaToMLProgramBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = TosaToMLProgramBase;
TosaToMLProgramBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
TosaToMLProgramBase(const TosaToMLProgramBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
TosaToMLProgramBase& operator=(const TosaToMLProgramBase &) = delete;
TosaToMLProgramBase(TosaToMLProgramBase &&) = delete;
TosaToMLProgramBase& operator=(TosaToMLProgramBase &&) = delete;
~TosaToMLProgramBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("tosa-to-mlprogram");
}
::llvm::StringRef getArgument() const override { return "tosa-to-mlprogram"; }
::llvm::StringRef getDescription() const override { return "Lower TOSA to the MLProgram dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("TosaToMLProgram");
}
::llvm::StringRef getName() const override { return "TosaToMLProgram"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<ml_program::MLProgramDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TosaToMLProgramBase<DerivedT>)
protected:
};
template <typename DerivedT>
class TosaToSCFBase : public ::mlir::OperationPass<> {
public:
using Base = TosaToSCFBase;
TosaToSCFBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
TosaToSCFBase(const TosaToSCFBase &other) : ::mlir::OperationPass<>(other) {}
TosaToSCFBase& operator=(const TosaToSCFBase &) = delete;
TosaToSCFBase(TosaToSCFBase &&) = delete;
TosaToSCFBase& operator=(TosaToSCFBase &&) = delete;
~TosaToSCFBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("tosa-to-scf");
}
::llvm::StringRef getArgument() const override { return "tosa-to-scf"; }
::llvm::StringRef getDescription() const override { return "Lower TOSA to the SCF dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("TosaToSCF");
}
::llvm::StringRef getName() const override { return "TosaToSCF"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<tensor::TensorDialect, scf::SCFDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TosaToSCFBase<DerivedT>)
protected:
};
template <typename DerivedT>
class TosaToTensorBase : public ::mlir::OperationPass<> {
public:
using Base = TosaToTensorBase;
TosaToTensorBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
TosaToTensorBase(const TosaToTensorBase &other) : ::mlir::OperationPass<>(other) {}
TosaToTensorBase& operator=(const TosaToTensorBase &) = delete;
TosaToTensorBase(TosaToTensorBase &&) = delete;
TosaToTensorBase& operator=(TosaToTensorBase &&) = delete;
~TosaToTensorBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("tosa-to-tensor");
}
::llvm::StringRef getArgument() const override { return "tosa-to-tensor"; }
::llvm::StringRef getDescription() const override { return "Lower TOSA to the Tensor dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("TosaToTensor");
}
::llvm::StringRef getName() const override { return "TosaToTensor"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<tensor::TensorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TosaToTensorBase<DerivedT>)
protected:
};
template <typename DerivedT>
class UBToLLVMConversionPassBase : public ::mlir::OperationPass<> {
public:
using Base = UBToLLVMConversionPassBase;
UBToLLVMConversionPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
UBToLLVMConversionPassBase(const UBToLLVMConversionPassBase &other) : ::mlir::OperationPass<>(other) {}
UBToLLVMConversionPassBase& operator=(const UBToLLVMConversionPassBase &) = delete;
UBToLLVMConversionPassBase(UBToLLVMConversionPassBase &&) = delete;
UBToLLVMConversionPassBase& operator=(UBToLLVMConversionPassBase &&) = delete;
~UBToLLVMConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-ub-to-llvm");
}
::llvm::StringRef getArgument() const override { return "convert-ub-to-llvm"; }
::llvm::StringRef getDescription() const override { return "Convert UB dialect to LLVM dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("UBToLLVMConversionPass");
}
::llvm::StringRef getName() const override { return "UBToLLVMConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<LLVM::LLVMDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(UBToLLVMConversionPassBase<DerivedT>)
protected:
::mlir::Pass::Option<unsigned> indexBitwidth{*this, "index-bitwidth", ::llvm::cl::desc("Bitwidth of the index type, 0 to use size of machine word"), ::llvm::cl::init(0)};
};
template <typename DerivedT>
class UBToSPIRVConversionPassBase : public ::mlir::OperationPass<> {
public:
using Base = UBToSPIRVConversionPassBase;
UBToSPIRVConversionPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
UBToSPIRVConversionPassBase(const UBToSPIRVConversionPassBase &other) : ::mlir::OperationPass<>(other) {}
UBToSPIRVConversionPassBase& operator=(const UBToSPIRVConversionPassBase &) = delete;
UBToSPIRVConversionPassBase(UBToSPIRVConversionPassBase &&) = delete;
UBToSPIRVConversionPassBase& operator=(UBToSPIRVConversionPassBase &&) = delete;
~UBToSPIRVConversionPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("convert-ub-to-spirv");
}
::llvm::StringRef getArgument() const override { return "convert-ub-to-spirv"; }
::llvm::StringRef getDescription() const override { return "Convert UB dialect to SPIR-V dialect"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("UBToSPIRVConversionPass");
}
::llvm::StringRef getName() const override { return "UBToSPIRVConversionPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<spirv::SPIRVDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(UBToSPIRVConversionPassBase<DerivedT>)
protected:
};
#undef GEN_PASS_CLASSES
#endif