llvm/tools/mlir/include/mlir/Dialect/MLProgram/Transforms/Passes.h.inc

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

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

//===----------------------------------------------------------------------===//
// MLProgramPipelineGlobals
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MLPROGRAMPIPELINEGLOBALS
#undef GEN_PASS_DECL_MLPROGRAMPIPELINEGLOBALS
#endif // GEN_PASS_DECL_MLPROGRAMPIPELINEGLOBALS
#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;

  /// 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 "Optimize `ml_program` global operations for read and store"; }

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

  /// 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(MLProgramPipelineGlobalsBase<DerivedT>)

protected:
private:
};
} // namespace impl
#undef GEN_PASS_DEF_MLPROGRAMPIPELINEGLOBALS
#endif // GEN_PASS_DEF_MLPROGRAMPIPELINEGLOBALS
#ifdef GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// MLProgramPipelineGlobals Registration
//===----------------------------------------------------------------------===//

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

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

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

inline void registerMLProgramPasses() {
  registerMLProgramPipelineGlobals();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
// Deprecated. Please use the new per-pass macros.
#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;

  /// 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 "Optimize `ml_program` global operations for read and store"; }

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

  /// 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));
  }

  /// Register the dialects 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(MLProgramPipelineGlobalsBase<DerivedT>)

protected:
};
#undef GEN_PASS_CLASSES
#endif // GEN_PASS_CLASSES