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

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

//===----------------------------------------------------------------------===//
// ACCDeclareActionConversion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCDECLAREACTIONCONVERSION
std::unique_ptr<::mlir::Pass> createACCDeclareActionConversion();
#undef GEN_PASS_DECL_ACCDECLAREACTIONCONVERSION
#endif // GEN_PASS_DECL_ACCDECLAREACTIONCONVERSION
#ifdef GEN_PASS_DEF_ACCDECLAREACTIONCONVERSION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert acc declare action attributes to function calls)PD"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// 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

//===----------------------------------------------------------------------===//
// ACCOptimizeFirstprivateMap
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCOPTIMIZEFIRSTPRIVATEMAP
std::unique_ptr<::mlir::Pass> createACCOptimizeFirstprivateMap();
#undef GEN_PASS_DECL_ACCOPTIMIZEFIRSTPRIVATEMAP
#endif // GEN_PASS_DECL_ACCOPTIMIZEFIRSTPRIVATEMAP
#ifdef GEN_PASS_DEF_ACCOPTIMIZEFIRSTPRIVATEMAP

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Optimize firstprivate mapping)PD"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// 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

//===----------------------------------------------------------------------===//
// ACCUseDeviceCanonicalizer
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCUSEDEVICECANONICALIZER
std::unique_ptr<::mlir::Pass> createACCUseDeviceCanonicalizer();
#undef GEN_PASS_DECL_ACCUSEDEVICECANONICALIZER
#endif // GEN_PASS_DECL_ACCUSEDEVICECANONICALIZER
#ifdef GEN_PASS_DEF_ACCUSEDEVICECANONICALIZER

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Canonicalize acc.use_device operations for FIR box types)PD"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// ACCDeclareActionConversion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCDECLAREACTIONCONVERSION

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

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

#undef GEN_PASS_REGISTRATION_ACCDECLAREACTIONCONVERSION
#endif // GEN_PASS_REGISTRATION_ACCDECLAREACTIONCONVERSION

//===----------------------------------------------------------------------===//
// 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

//===----------------------------------------------------------------------===//
// ACCOptimizeFirstprivateMap Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCOPTIMIZEFIRSTPRIVATEMAP

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

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

#undef GEN_PASS_REGISTRATION_ACCOPTIMIZEFIRSTPRIVATEMAP
#endif // GEN_PASS_REGISTRATION_ACCOPTIMIZEFIRSTPRIVATEMAP

//===----------------------------------------------------------------------===//
// 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

//===----------------------------------------------------------------------===//
// ACCUseDeviceCanonicalizer Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCUSEDEVICECANONICALIZER

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

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

#undef GEN_PASS_REGISTRATION_ACCUSEDEVICECANONICALIZER
#endif // GEN_PASS_REGISTRATION_ACCUSEDEVICECANONICALIZER
#ifdef GEN_PASS_REGISTRATION

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

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