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

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_FUNCTIONFILTERINGPASS
#define GEN_PASS_DECL_GENERICLOOPCONVERSIONPASS
#define GEN_PASS_DECL_LOWERWORKSHARE
#define GEN_PASS_DECL_MAPINFOFINALIZATIONPASS
#define GEN_PASS_DECL_MAPSFORPRIVATIZEDSYMBOLSPASS
#define GEN_PASS_DECL_MARKDECLARETARGETPASS
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// FunctionFilteringPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_FUNCTIONFILTERINGPASS
std::unique_ptr<::mlir::Pass> createFunctionFilteringPass();
#undef GEN_PASS_DECL_FUNCTIONFILTERINGPASS
#endif // GEN_PASS_DECL_FUNCTIONFILTERINGPASS
#ifdef GEN_PASS_DEF_FUNCTIONFILTERINGPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Filters out functions intended for the host when compiling for the target device."; }

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

  /// 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::func::FuncDialect>();
    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(FunctionFilteringPassBase<DerivedT>)

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// GenericLoopConversionPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_GENERICLOOPCONVERSIONPASS
std::unique_ptr<::mlir::Pass> createGenericLoopConversionPass();
#undef GEN_PASS_DECL_GENERICLOOPCONVERSIONPASS
#endif // GEN_PASS_DECL_GENERICLOOPCONVERSIONPASS
#ifdef GEN_PASS_DEF_GENERICLOOPCONVERSIONPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Converts OpenMP generic `omp.loop` to semantically equivalent OpenMP ops"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// LowerWorkshare
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LOWERWORKSHARE
std::unique_ptr<::mlir::Pass> createLowerWorkshare();
#undef GEN_PASS_DECL_LOWERWORKSHARE
#endif // GEN_PASS_DECL_LOWERWORKSHARE
#ifdef GEN_PASS_DEF_LOWERWORKSHARE

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Lower workshare construct"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// MapInfoFinalizationPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MAPINFOFINALIZATIONPASS
std::unique_ptr<::mlir::Pass> createMapInfoFinalizationPass();
#undef GEN_PASS_DECL_MAPINFOFINALIZATIONPASS
#endif // GEN_PASS_DECL_MAPINFOFINALIZATIONPASS
#ifdef GEN_PASS_DEF_MAPINFOFINALIZATIONPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "expands OpenMP MapInfo operations containing descriptors"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// MapsForPrivatizedSymbolsPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MAPSFORPRIVATIZEDSYMBOLSPASS
std::unique_ptr<::mlir::Pass> createMapsForPrivatizedSymbolsPass();
#undef GEN_PASS_DECL_MAPSFORPRIVATIZEDSYMBOLSPASS
#endif // GEN_PASS_DECL_MAPSFORPRIVATIZEDSYMBOLSPASS
#ifdef GEN_PASS_DEF_MAPSFORPRIVATIZEDSYMBOLSPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Creates MapInfoOp instances for privatized symbols when needed"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// MarkDeclareTargetPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MARKDECLARETARGETPASS
std::unique_ptr<::mlir::Pass> createMarkDeclareTargetPass();
#undef GEN_PASS_DECL_MARKDECLARETARGETPASS
#endif // GEN_PASS_DECL_MARKDECLARETARGETPASS
#ifdef GEN_PASS_DEF_MARKDECLARETARGETPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Marks all functions called by an OpenMP declare target function as declare target"; }

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

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

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

protected:
private:

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

std::unique_ptr<::mlir::Pass> createMarkDeclareTargetPass() {
  return impl::createMarkDeclareTargetPass();
}
#undef GEN_PASS_DEF_MARKDECLARETARGETPASS
#endif // GEN_PASS_DEF_MARKDECLARETARGETPASS
#ifdef GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// FunctionFilteringPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// GenericLoopConversionPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// LowerWorkshare Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// MapInfoFinalizationPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// MapsForPrivatizedSymbolsPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// MarkDeclareTargetPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// FlangOpenMP Registration
//===----------------------------------------------------------------------===//

inline void registerFlangOpenMPPasses() {
  registerFunctionFilteringPass();
  registerGenericLoopConversionPass();
  registerLowerWorkshare();
  registerMapInfoFinalizationPass();
  registerMapsForPrivatizedSymbolsPass();
  registerMarkDeclareTargetPass();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
// Deprecated. Please use the new per-pass macros.
#ifdef GEN_PASS_CLASSES

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

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

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

  ::llvm::StringRef getDescription() const override { return "Filters out functions intended for the host when compiling for the target device."; }

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

  /// 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 {
    registry.insert<mlir::func::FuncDialect>();
    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(FunctionFilteringPassBase<DerivedT>)

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Converts OpenMP generic `omp.loop` to semantically equivalent OpenMP ops"; }

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

  /// 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 {
    registry.insert<mlir::omp::OpenMPDialect>();
  }

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

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Lower workshare construct"; }

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

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

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "expands OpenMP MapInfo operations containing descriptors"; }

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

  /// 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 {
    registry.insert<mlir::omp::OpenMPDialect>();
  }

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

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Creates MapInfoOp instances for privatized symbols when needed"; }

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

  /// 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 {
    registry.insert<mlir::omp::OpenMPDialect>();
  }

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

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Marks all functions called by an OpenMP declare target function as declare target"; }

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

  /// 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 {
    registry.insert<mlir::omp::OpenMPDialect>();
  }

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

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