#ifdef GEN_PASS_DECL
#define GEN_PASS_DECL_LOWERVECTORMASKPASS
#define GEN_PASS_DECL_LOWERVECTORMULTIREDUCTION
#undef GEN_PASS_DECL
#endif
#ifdef GEN_PASS_DECL_LOWERVECTORMASKPASS
#undef GEN_PASS_DECL_LOWERVECTORMASKPASS
#endif
#ifdef GEN_PASS_DEF_LOWERVECTORMASKPASS
namespace impl {
template <typename DerivedT>
class LowerVectorMaskPassBase : public ::mlir::OperationPass<func::FuncOp> {
public:
using Base = LowerVectorMaskPassBase;
LowerVectorMaskPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
LowerVectorMaskPassBase(const LowerVectorMaskPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}
LowerVectorMaskPassBase& operator=(const LowerVectorMaskPassBase &) = delete;
LowerVectorMaskPassBase(LowerVectorMaskPassBase &&) = delete;
LowerVectorMaskPassBase& operator=(LowerVectorMaskPassBase &&) = delete;
~LowerVectorMaskPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("lower-vector-mask");
}
::llvm::StringRef getArgument() const override { return "lower-vector-mask"; }
::llvm::StringRef getDescription() const override { return "Lower 'vector.mask' operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("LowerVectorMaskPass");
}
::llvm::StringRef getName() const override { return "LowerVectorMaskPass"; }
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(LowerVectorMaskPassBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_LOWERVECTORMASKPASS
#endif
#ifdef GEN_PASS_DECL_LOWERVECTORMULTIREDUCTION
struct LowerVectorMultiReductionOptions { … };
#undef GEN_PASS_DECL_LOWERVECTORMULTIREDUCTION
#endif
#ifdef GEN_PASS_DEF_LOWERVECTORMULTIREDUCTION
namespace impl {
template <typename DerivedT>
class LowerVectorMultiReductionBase : public ::mlir::OperationPass<func::FuncOp> {
public:
using Base = LowerVectorMultiReductionBase;
LowerVectorMultiReductionBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
LowerVectorMultiReductionBase(const LowerVectorMultiReductionBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}
LowerVectorMultiReductionBase& operator=(const LowerVectorMultiReductionBase &) = delete;
LowerVectorMultiReductionBase(LowerVectorMultiReductionBase &&) = delete;
LowerVectorMultiReductionBase& operator=(LowerVectorMultiReductionBase &&) = delete;
~LowerVectorMultiReductionBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("lower-vector-multi-reduction");
}
::llvm::StringRef getArgument() const override { return "lower-vector-multi-reduction"; }
::llvm::StringRef getDescription() const override { return "Lower 'vector.multi_reduction' operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("LowerVectorMultiReduction");
}
::llvm::StringRef getName() const override { return "LowerVectorMultiReduction"; }
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(LowerVectorMultiReductionBase<DerivedT>)
LowerVectorMultiReductionBase(LowerVectorMultiReductionOptions options) : LowerVectorMultiReductionBase() {
loweringStrategy = std::move(options.loweringStrategy);
}
protected:
::mlir::Pass::Option<mlir::vector::VectorMultiReductionLowering> loweringStrategy{*this, "lowering-strategy", ::llvm::cl::desc("Select the strategy to control how multi_reduction is lowered."), ::llvm::cl::init(mlir::vector::VectorMultiReductionLowering::InnerParallel), ::llvm::cl::values(
clEnumValN(mlir::vector::VectorMultiReductionLowering::InnerParallel,
"inner-parallel",
"Lower multi_reduction into outer-reduction and inner-parallel ops."),
clEnumValN(mlir::vector::VectorMultiReductionLowering::InnerReduction,
"inner-reduction",
"Lower multi_reduction into outer-parallel and inner-reduction ops.")
)};
private:
};
}
#undef GEN_PASS_DEF_LOWERVECTORMULTIREDUCTION
#endif
#ifdef GEN_PASS_REGISTRATION
inline void registerLowerVectorMaskPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::vector::createLowerVectorMaskPass();
});
}
inline void registerLowerVectorMaskPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::vector::createLowerVectorMaskPass();
});
}
inline void registerLowerVectorMultiReduction() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::vector::createLowerVectorMultiReductionPass();
});
}
inline void registerLowerVectorMultiReductionPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::vector::createLowerVectorMultiReductionPass();
});
}
inline void registerVectorPasses() {
registerLowerVectorMaskPass();
registerLowerVectorMultiReduction();
}
#undef GEN_PASS_REGISTRATION
#endif
#ifdef GEN_PASS_CLASSES
template <typename DerivedT>
class LowerVectorMaskPassBase : public ::mlir::OperationPass<func::FuncOp> {
public:
using Base = LowerVectorMaskPassBase;
LowerVectorMaskPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
LowerVectorMaskPassBase(const LowerVectorMaskPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}
LowerVectorMaskPassBase& operator=(const LowerVectorMaskPassBase &) = delete;
LowerVectorMaskPassBase(LowerVectorMaskPassBase &&) = delete;
LowerVectorMaskPassBase& operator=(LowerVectorMaskPassBase &&) = delete;
~LowerVectorMaskPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("lower-vector-mask");
}
::llvm::StringRef getArgument() const override { return "lower-vector-mask"; }
::llvm::StringRef getDescription() const override { return "Lower 'vector.mask' operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("LowerVectorMaskPass");
}
::llvm::StringRef getName() const override { return "LowerVectorMaskPass"; }
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(LowerVectorMaskPassBase<DerivedT>)
protected:
};
template <typename DerivedT>
class LowerVectorMultiReductionBase : public ::mlir::OperationPass<func::FuncOp> {
public:
using Base = LowerVectorMultiReductionBase;
LowerVectorMultiReductionBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
LowerVectorMultiReductionBase(const LowerVectorMultiReductionBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}
LowerVectorMultiReductionBase& operator=(const LowerVectorMultiReductionBase &) = delete;
LowerVectorMultiReductionBase(LowerVectorMultiReductionBase &&) = delete;
LowerVectorMultiReductionBase& operator=(LowerVectorMultiReductionBase &&) = delete;
~LowerVectorMultiReductionBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("lower-vector-multi-reduction");
}
::llvm::StringRef getArgument() const override { return "lower-vector-multi-reduction"; }
::llvm::StringRef getDescription() const override { return "Lower 'vector.multi_reduction' operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("LowerVectorMultiReduction");
}
::llvm::StringRef getName() const override { return "LowerVectorMultiReduction"; }
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(LowerVectorMultiReductionBase<DerivedT>)
protected:
::mlir::Pass::Option<mlir::vector::VectorMultiReductionLowering> loweringStrategy{*this, "lowering-strategy", ::llvm::cl::desc("Select the strategy to control how multi_reduction is lowered."), ::llvm::cl::init(mlir::vector::VectorMultiReductionLowering::InnerParallel), ::llvm::cl::values(
clEnumValN(mlir::vector::VectorMultiReductionLowering::InnerParallel,
"inner-parallel",
"Lower multi_reduction into outer-reduction and inner-parallel ops."),
clEnumValN(mlir::vector::VectorMultiReductionLowering::InnerReduction,
"inner-reduction",
"Lower multi_reduction into outer-parallel and inner-reduction ops.")
)};
};
#undef GEN_PASS_CLASSES
#endif