/* Autogenerated by mlir-tblgen; don't manually edit */

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_MLPROGRAMPIPELINEGLOBALSPASS
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// MLProgramPipelineGlobalsPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MLPROGRAMPIPELINEGLOBALSPASS
std::unique_ptr<::mlir::Pass> createMLProgramPipelineGlobalsPass();
#undef GEN_PASS_DECL_MLPROGRAMPIPELINEGLOBALSPASS
#endif // GEN_PASS_DECL_MLPROGRAMPIPELINEGLOBALSPASS
#ifdef GEN_PASS_DEF_MLPROGRAMPIPELINEGLOBALSPASS

namespace impl {
  std::unique_ptr<::mlir::Pass> createMLProgramPipelineGlobalsPass();
} // namespace impl
namespace impl {

template <typename DerivedT>
class MLProgramPipelineGlobalsPassBase : public ::mlir::OperationPass<ModuleOp> {
public:
  using Base = MLProgramPipelineGlobalsPassBase;

  MLProgramPipelineGlobalsPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  MLProgramPipelineGlobalsPassBase(const MLProgramPipelineGlobalsPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
  MLProgramPipelineGlobalsPassBase& operator=(const MLProgramPipelineGlobalsPassBase &) = delete;
  MLProgramPipelineGlobalsPassBase(MLProgramPipelineGlobalsPassBase &&) = delete;
  MLProgramPipelineGlobalsPassBase& operator=(MLProgramPipelineGlobalsPassBase &&) = delete;
  ~MLProgramPipelineGlobalsPassBase() = default;

  /// Returns the command-line argument attached to this pass.
  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 R"PD(Optimize `ml_program` global operations for read and store)PD"; }

  /// Returns the derived pass name.
  static constexpr ::llvm::StringLiteral getPassName() {
    return ::llvm::StringLiteral("MLProgramPipelineGlobalsPass");
  }
  ::llvm::StringRef getName() const override { return "MLProgramPipelineGlobalsPass"; }

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(MLProgramPipelineGlobalsPassBase<DerivedT>)

protected:
private:

  friend std::unique_ptr<::mlir::Pass> createMLProgramPipelineGlobalsPass() {
    return std::make_unique<DerivedT>();
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createMLProgramPipelineGlobalsPass() {
  return impl::createMLProgramPipelineGlobalsPass();
}
#undef GEN_PASS_DEF_MLPROGRAMPIPELINEGLOBALSPASS
#endif // GEN_PASS_DEF_MLPROGRAMPIPELINEGLOBALSPASS
#ifdef GEN_PASS_REGISTRATION
// Generate registrations for all passes.
#define GEN_PASS_REGISTRATION_MLPROGRAMPIPELINEGLOBALSPASS
#endif // GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// MLProgramPipelineGlobalsPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_MLPROGRAMPIPELINEGLOBALSPASS

inline void registerMLProgramPipelineGlobalsPass() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return createMLProgramPipelineGlobalsPass();
  });
}

// Old registration code, kept for temporary backwards compatibility.
inline void registerMLProgramPipelineGlobalsPassPass() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return createMLProgramPipelineGlobalsPass();
  });
}

#undef GEN_PASS_REGISTRATION_MLPROGRAMPIPELINEGLOBALSPASS
#endif // GEN_PASS_REGISTRATION_MLPROGRAMPIPELINEGLOBALSPASS
#ifdef GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// MLProgram Registration
//===----------------------------------------------------------------------===//

inline void registerMLProgramPasses() {
  registerMLProgramPipelineGlobalsPass();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
#ifdef GEN_PASS_CLASSES
#error "GEN_PASS_CLASSES is deprecated; use per-pass macros"
#undef GEN_PASS_CLASSES
#endif // GEN_PASS_CLASSES
