#ifdef GEN_PASS_DECL
#define GEN_PASS_DECL_MLPROGRAMPIPELINEGLOBALS
#undef GEN_PASS_DECL
#endif
#ifdef GEN_PASS_DECL_MLPROGRAMPIPELINEGLOBALS
#undef GEN_PASS_DECL_MLPROGRAMPIPELINEGLOBALS
#endif
#ifdef GEN_PASS_DEF_MLPROGRAMPIPELINEGLOBALS
namespace impl {
template <typename DerivedT>
class MLProgramPipelineGlobalsBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = MLProgramPipelineGlobalsBase;
MLProgramPipelineGlobalsBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
MLProgramPipelineGlobalsBase(const MLProgramPipelineGlobalsBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
MLProgramPipelineGlobalsBase& operator=(const MLProgramPipelineGlobalsBase &) = delete;
MLProgramPipelineGlobalsBase(MLProgramPipelineGlobalsBase &&) = delete;
MLProgramPipelineGlobalsBase& operator=(MLProgramPipelineGlobalsBase &&) = delete;
~MLProgramPipelineGlobalsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("mlprogram-pipeline-globals");
}
::llvm::StringRef getArgument() const override { return "mlprogram-pipeline-globals"; }
::llvm::StringRef getDescription() const override { return "Optimize `ml_program` global operations for read and store"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("MLProgramPipelineGlobals");
}
::llvm::StringRef getName() const override { return "MLProgramPipelineGlobals"; }
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(MLProgramPipelineGlobalsBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_MLPROGRAMPIPELINEGLOBALS
#endif
#ifdef GEN_PASS_REGISTRATION
inline void registerMLProgramPipelineGlobals() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::ml_program::createMLProgramPipelineGlobalsPass();
});
}
inline void registerMLProgramPipelineGlobalsPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::ml_program::createMLProgramPipelineGlobalsPass();
});
}
inline void registerMLProgramPasses() {
registerMLProgramPipelineGlobals();
}
#undef GEN_PASS_REGISTRATION
#endif
#ifdef GEN_PASS_CLASSES
template <typename DerivedT>
class MLProgramPipelineGlobalsBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = MLProgramPipelineGlobalsBase;
MLProgramPipelineGlobalsBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
MLProgramPipelineGlobalsBase(const MLProgramPipelineGlobalsBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
MLProgramPipelineGlobalsBase& operator=(const MLProgramPipelineGlobalsBase &) = delete;
MLProgramPipelineGlobalsBase(MLProgramPipelineGlobalsBase &&) = delete;
MLProgramPipelineGlobalsBase& operator=(MLProgramPipelineGlobalsBase &&) = delete;
~MLProgramPipelineGlobalsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("mlprogram-pipeline-globals");
}
::llvm::StringRef getArgument() const override { return "mlprogram-pipeline-globals"; }
::llvm::StringRef getDescription() const override { return "Optimize `ml_program` global operations for read and store"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("MLProgramPipelineGlobals");
}
::llvm::StringRef getName() const override { return "MLProgramPipelineGlobals"; }
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(MLProgramPipelineGlobalsBase<DerivedT>)
protected:
};
#undef GEN_PASS_CLASSES
#endif