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

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

//===----------------------------------------------------------------------===//
// LegalizeXLAFrameworkToLLVM
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LEGALIZEXLAFRAMEWORKTOLLVM
#undef GEN_PASS_DECL_LEGALIZEXLAFRAMEWORKTOLLVM
#endif // GEN_PASS_DECL_LEGALIZEXLAFRAMEWORKTOLLVM
#ifdef GEN_PASS_DEF_LEGALIZEXLAFRAMEWORKTOLLVM
namespace impl {

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

  LegalizeXLAFrameworkToLLVMBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeXLAFrameworkToLLVMBase(const LegalizeXLAFrameworkToLLVMBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("xla-legalize-xla-framework-to-llvm");
  }
  ::llvm::StringRef getArgument() const override { return "xla-legalize-xla-framework-to-llvm"; }

  ::llvm::StringRef getDescription() const override { return "Legalize XLAFramework to bare pointers and LLVM memref descriptors"; }

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

  /// 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 {
    
  registry.insert<::mlir::LLVM::LLVMDialect>();

  }

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

protected:
private:
};
} // namespace impl
#undef GEN_PASS_DEF_LEGALIZEXLAFRAMEWORKTOLLVM
#endif // GEN_PASS_DEF_LEGALIZEXLAFRAMEWORKTOLLVM

//===----------------------------------------------------------------------===//
// OutlineWithXLAFramework
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_OUTLINEWITHXLAFRAMEWORK
#undef GEN_PASS_DECL_OUTLINEWITHXLAFRAMEWORK
#endif // GEN_PASS_DECL_OUTLINEWITHXLAFRAMEWORK
#ifdef GEN_PASS_DEF_OUTLINEWITHXLAFRAMEWORK
namespace impl {

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

  OutlineWithXLAFrameworkBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  OutlineWithXLAFrameworkBase(const OutlineWithXLAFrameworkBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("outline-with-xla-framework");
  }
  ::llvm::StringRef getArgument() const override { return "outline-with-xla-framework"; }

  ::llvm::StringRef getDescription() const override { return "Create XLAFramework based wrapper function to match XLA:CPU's interface"; }

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

  /// 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 {
    
  registry.insert<::mlir::xla_framework::XLAFrameworkDialect>();

  }

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

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

//===----------------------------------------------------------------------===//
// LegalizeXLAFrameworkToLLVM Registration
//===----------------------------------------------------------------------===//

inline void registerLegalizeXLAFrameworkToLLVM() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return ::mlir::mhlo::CreateLegalizeXLAFrameworkToLLVMPass();
  });
}

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

//===----------------------------------------------------------------------===//
// OutlineWithXLAFramework Registration
//===----------------------------------------------------------------------===//

inline void registerOutlineWithXLAFramework() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return ::mlir::mhlo::CreateOutlineWithXLAFrameworkPass();
  });
}

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

//===----------------------------------------------------------------------===//
// Xla Registration
//===----------------------------------------------------------------------===//

inline void registerXlaPasses() {
  registerLegalizeXLAFrameworkToLLVM();
  registerOutlineWithXLAFramework();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
// Deprecated. Please use the new per-pass macros.
#ifdef GEN_PASS_CLASSES

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

  LegalizeXLAFrameworkToLLVMBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeXLAFrameworkToLLVMBase(const LegalizeXLAFrameworkToLLVMBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("xla-legalize-xla-framework-to-llvm");
  }
  ::llvm::StringRef getArgument() const override { return "xla-legalize-xla-framework-to-llvm"; }

  ::llvm::StringRef getDescription() const override { return "Legalize XLAFramework to bare pointers and LLVM memref descriptors"; }

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

  /// 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 {
    
  registry.insert<::mlir::LLVM::LLVMDialect>();

  }

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

protected:
};

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

  OutlineWithXLAFrameworkBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  OutlineWithXLAFrameworkBase(const OutlineWithXLAFrameworkBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("outline-with-xla-framework");
  }
  ::llvm::StringRef getArgument() const override { return "outline-with-xla-framework"; }

  ::llvm::StringRef getDescription() const override { return "Create XLAFramework based wrapper function to match XLA:CPU's interface"; }

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

  /// 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 {
    
  registry.insert<::mlir::xla_framework::XLAFrameworkDialect>();

  }

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

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