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

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

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:
};

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

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:
};

//===----------------------------------------------------------------------===//
// PrepareForExportPass
//===----------------------------------------------------------------------===//

template <typename DerivedT>
class PrepareForExportPassBase : public ::mlir::OperationPass<mlir::func::FuncOp> {
public:
  using Base = PrepareForExportPassBase;

  PrepareForExportPassBase() : ::mlir::OperationPass<mlir::func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  PrepareForExportPassBase(const PrepareForExportPassBase &other) : ::mlir::OperationPass<mlir::func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Prepare for XLA export"; }

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

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

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

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

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

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

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

//===----------------------------------------------------------------------===//
// PrepareForExportPass Registration
//===----------------------------------------------------------------------===//

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

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

inline void registerXlaPasses() {
  registerLegalizeXLAFrameworkToLLVMPass();
  registerOutlineWithXLAFrameworkPass();
  registerPrepareForExportPassPass();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
