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

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

//===----------------------------------------------------------------------===//
// ACCInitializeFIRAnalyses
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCINITIALIZEFIRANALYSES
std::unique_ptr<::mlir::Pass> createACCInitializeFIRAnalyses();
#undef GEN_PASS_DECL_ACCINITIALIZEFIRANALYSES
#endif // GEN_PASS_DECL_ACCINITIALIZEFIRANALYSES
#ifdef GEN_PASS_DEF_ACCINITIALIZEFIRANALYSES

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Initialize FIR analyses for OpenACC passes)PD"; }

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

  /// 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<fir::FIROpsDialect>();
    registry.insert<hlfir::hlfirDialect>();
    registry.insert<mlir::acc::OpenACCDialect>();
  }

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

protected:
private:

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

std::unique_ptr<::mlir::Pass> createACCInitializeFIRAnalyses() {
  return impl::createACCInitializeFIRAnalyses();
}
#undef GEN_PASS_DEF_ACCINITIALIZEFIRANALYSES
#endif // GEN_PASS_DEF_ACCINITIALIZEFIRANALYSES

//===----------------------------------------------------------------------===//
// ACCRecipeBufferization
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCRECIPEBUFFERIZATION
std::unique_ptr<::mlir::Pass> createACCRecipeBufferization();
#undef GEN_PASS_DECL_ACCRECIPEBUFFERIZATION
#endif // GEN_PASS_DECL_ACCRECIPEBUFFERIZATION
#ifdef GEN_PASS_DEF_ACCRECIPEBUFFERIZATION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Rewrite acc.*.recipe box values to ref<box> and update uses)PD"; }

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

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

protected:
private:

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

std::unique_ptr<::mlir::Pass> createACCRecipeBufferization() {
  return impl::createACCRecipeBufferization();
}
#undef GEN_PASS_DEF_ACCRECIPEBUFFERIZATION
#endif // GEN_PASS_DEF_ACCRECIPEBUFFERIZATION
#ifdef GEN_PASS_REGISTRATION
// Generate registrations for all passes.
#define GEN_PASS_REGISTRATION_ACCINITIALIZEFIRANALYSES
#define GEN_PASS_REGISTRATION_ACCRECIPEBUFFERIZATION
#endif // GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// ACCInitializeFIRAnalyses Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCINITIALIZEFIRANALYSES

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

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

#undef GEN_PASS_REGISTRATION_ACCINITIALIZEFIRANALYSES
#endif // GEN_PASS_REGISTRATION_ACCINITIALIZEFIRANALYSES

//===----------------------------------------------------------------------===//
// ACCRecipeBufferization Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCRECIPEBUFFERIZATION

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

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

#undef GEN_PASS_REGISTRATION_ACCRECIPEBUFFERIZATION
#endif // GEN_PASS_REGISTRATION_ACCRECIPEBUFFERIZATION
#ifdef GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// FIROpenACC Registration
//===----------------------------------------------------------------------===//

inline void registerFIROpenACCPasses() {
  registerACCInitializeFIRAnalyses();
  registerACCRecipeBufferization();
}
#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
