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

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_ACCBINDROUTINE
#define GEN_PASS_DECL_ACCCOMPUTELOWERING
#define GEN_PASS_DECL_ACCDECLAREGPUMODULEINSERTION
#define GEN_PASS_DECL_ACCEMITREMARKSLOOP
#define GEN_PASS_DECL_ACCEMITREMARKSPRIVATE
#define GEN_PASS_DECL_ACCIFCLAUSELOWERING
#define GEN_PASS_DECL_ACCIMPLICITDATA
#define GEN_PASS_DECL_ACCIMPLICITDECLARE
#define GEN_PASS_DECL_ACCIMPLICITROUTINE
#define GEN_PASS_DECL_ACCLEGALIZESERIAL
#define GEN_PASS_DECL_ACCLOOPTILING
#define GEN_PASS_DECL_ACCRECIPEMATERIALIZATION
#define GEN_PASS_DECL_ACCROUTINELOWERING
#define GEN_PASS_DECL_ACCROUTINETOGPUFUNC
#define GEN_PASS_DECL_ACCSPECIALIZEFORDEVICE
#define GEN_PASS_DECL_ACCSPECIALIZEFORHOST
#define GEN_PASS_DECL_LEGALIZEDATAVALUESINREGION
#define GEN_PASS_DECL_OFFLOADLIVEINVALUECANONICALIZATION
#define GEN_PASS_DECL_OFFLOADTARGETVERIFIER
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// ACCBindRoutine
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCBINDROUTINE
struct ACCBindRoutineOptions {
  mlir::acc::DeviceType deviceType = mlir::acc::DeviceType::None;
};
std::unique_ptr<::mlir::Pass> createACCBindRoutine();
std::unique_ptr<::mlir::Pass> createACCBindRoutine(ACCBindRoutineOptions options);
#undef GEN_PASS_DECL_ACCBINDROUTINE
#endif // GEN_PASS_DECL_ACCBINDROUTINE
#ifdef GEN_PASS_DEF_ACCBINDROUTINE

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createACCBindRoutine(ACCBindRoutineOptions options);
} // namespace impl
namespace impl {

template <typename DerivedT>
class ACCBindRoutineBase : public ::mlir::InterfacePass<mlir::FunctionOpInterface> {
public:
  using Base = ACCBindRoutineBase;

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Apply bind clause to function calls in ACC compute regions)PD"; }

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

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

  ACCBindRoutineBase(ACCBindRoutineOptions options) : ACCBindRoutineBase() {
    deviceType = std::move(options.deviceType);
  }
protected:
  ::mlir::Pass::Option<mlir::acc::DeviceType> deviceType{*this, "device-type", ::llvm::cl::desc(R"PO(Target device type. One use case is ensuring that device_type-specific clauses are considered. Another is device-specific specializations.)PO"), ::llvm::cl::init(mlir::acc::DeviceType::None), ::llvm::cl::values(
       clEnumValN(mlir::acc::DeviceType::None, "none", "none"),
       clEnumValN(mlir::acc::DeviceType::Host, "host", "host"),
       clEnumValN(mlir::acc::DeviceType::Multicore, "multicore", "multicore"),
       clEnumValN(mlir::acc::DeviceType::Nvidia, "nvidia", "nvidia"),
       clEnumValN(mlir::acc::DeviceType::Radeon, "radeon", "radeon"))
    };
private:

  friend std::unique_ptr<::mlir::Pass> createACCBindRoutine() {
    return std::make_unique<DerivedT>();
  }

  friend std::unique_ptr<::mlir::Pass> createACCBindRoutine(ACCBindRoutineOptions options) {
    return std::make_unique<DerivedT>(std::move(options));
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createACCBindRoutine() {
  return impl::createACCBindRoutine();
}

std::unique_ptr<::mlir::Pass> createACCBindRoutine(ACCBindRoutineOptions options) {
  return impl::createACCBindRoutine(std::move(options));
}
#undef GEN_PASS_DEF_ACCBINDROUTINE
#endif // GEN_PASS_DEF_ACCBINDROUTINE

//===----------------------------------------------------------------------===//
// ACCComputeLowering
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCCOMPUTELOWERING
struct ACCComputeLoweringOptions {
  mlir::acc::DeviceType deviceType = mlir::acc::DeviceType::None;
};
std::unique_ptr<::mlir::Pass> createACCComputeLowering();
std::unique_ptr<::mlir::Pass> createACCComputeLowering(ACCComputeLoweringOptions options);
#undef GEN_PASS_DECL_ACCCOMPUTELOWERING
#endif // GEN_PASS_DECL_ACCCOMPUTELOWERING
#ifdef GEN_PASS_DEF_ACCCOMPUTELOWERING

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createACCComputeLowering(ACCComputeLoweringOptions options);
} // namespace impl
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Lower ACC compute constructs to acc.compute_region)PD"; }

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

  /// 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<mlir::arith::ArithDialect>();
    registry.insert<mlir::scf::SCFDialect>();
  }

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

  ACCComputeLoweringBase(ACCComputeLoweringOptions options) : ACCComputeLoweringBase() {
    deviceType = std::move(options.deviceType);
  }
protected:
  ::mlir::Pass::Option<mlir::acc::DeviceType> deviceType{*this, "device-type", ::llvm::cl::desc(R"PO(Target device type. One use case is ensuring that device_type-specific clauses are considered. Another is device-specific specializations.)PO"), ::llvm::cl::init(mlir::acc::DeviceType::None), ::llvm::cl::values(
       clEnumValN(mlir::acc::DeviceType::None, "none", "none"),
       clEnumValN(mlir::acc::DeviceType::Host, "host", "host"),
       clEnumValN(mlir::acc::DeviceType::Multicore, "multicore", "multicore"),
       clEnumValN(mlir::acc::DeviceType::Nvidia, "nvidia", "nvidia"),
       clEnumValN(mlir::acc::DeviceType::Radeon, "radeon", "radeon"))
    };
private:

  friend std::unique_ptr<::mlir::Pass> createACCComputeLowering() {
    return std::make_unique<DerivedT>();
  }

  friend std::unique_ptr<::mlir::Pass> createACCComputeLowering(ACCComputeLoweringOptions options) {
    return std::make_unique<DerivedT>(std::move(options));
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createACCComputeLowering() {
  return impl::createACCComputeLowering();
}

std::unique_ptr<::mlir::Pass> createACCComputeLowering(ACCComputeLoweringOptions options) {
  return impl::createACCComputeLowering(std::move(options));
}
#undef GEN_PASS_DEF_ACCCOMPUTELOWERING
#endif // GEN_PASS_DEF_ACCCOMPUTELOWERING

//===----------------------------------------------------------------------===//
// ACCDeclareGPUModuleInsertion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCDECLAREGPUMODULEINSERTION
std::unique_ptr<::mlir::Pass> createACCDeclareGPUModuleInsertion();
#undef GEN_PASS_DECL_ACCDECLAREGPUMODULEINSERTION
#endif // GEN_PASS_DECL_ACCDECLAREGPUMODULEINSERTION
#ifdef GEN_PASS_DEF_ACCDECLAREGPUMODULEINSERTION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Copy globals with acc.declare into the GPU module)PD"; }

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

  /// 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<mlir::gpu::GPUDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// ACCEmitRemarksLoop
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCEMITREMARKSLOOP
struct ACCEmitRemarksLoopOptions {
  std::string gpuDimSeparator = ".";
};
std::unique_ptr<::mlir::Pass> createACCEmitRemarksLoop();
std::unique_ptr<::mlir::Pass> createACCEmitRemarksLoop(ACCEmitRemarksLoopOptions options);
#undef GEN_PASS_DECL_ACCEMITREMARKSLOOP
#endif // GEN_PASS_DECL_ACCEMITREMARKSLOOP
#ifdef GEN_PASS_DEF_ACCEMITREMARKSLOOP

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createACCEmitRemarksLoop(ACCEmitRemarksLoopOptions options);
} // namespace impl
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Emit OpenACC loop parallelism mapping remarks)PD"; }

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

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

  ACCEmitRemarksLoopBase(ACCEmitRemarksLoopOptions options) : ACCEmitRemarksLoopBase() {
    gpuDimSeparator = std::move(options.gpuDimSeparator);
  }
protected:
  ::mlir::Pass::Option<std::string> gpuDimSeparator{*this, "gpu-dim-separator", ::llvm::cl::desc(R"PO(Separator between GPU index prefix and axis name in remarks)PO"), ::llvm::cl::init(".")};
private:

  friend std::unique_ptr<::mlir::Pass> createACCEmitRemarksLoop() {
    return std::make_unique<DerivedT>();
  }

  friend std::unique_ptr<::mlir::Pass> createACCEmitRemarksLoop(ACCEmitRemarksLoopOptions options) {
    return std::make_unique<DerivedT>(std::move(options));
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createACCEmitRemarksLoop() {
  return impl::createACCEmitRemarksLoop();
}

std::unique_ptr<::mlir::Pass> createACCEmitRemarksLoop(ACCEmitRemarksLoopOptions options) {
  return impl::createACCEmitRemarksLoop(std::move(options));
}
#undef GEN_PASS_DEF_ACCEMITREMARKSLOOP
#endif // GEN_PASS_DEF_ACCEMITREMARKSLOOP

//===----------------------------------------------------------------------===//
// ACCEmitRemarksPrivate
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCEMITREMARKSPRIVATE
std::unique_ptr<::mlir::Pass> createACCEmitRemarksPrivate();
#undef GEN_PASS_DECL_ACCEMITREMARKSPRIVATE
#endif // GEN_PASS_DECL_ACCEMITREMARKSPRIVATE
#ifdef GEN_PASS_DEF_ACCEMITREMARKSPRIVATE

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Emit OpenACC private and firstprivate remarks)PD"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// ACCIfClauseLowering
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCIFCLAUSELOWERING
std::unique_ptr<::mlir::Pass> createACCIfClauseLowering();
#undef GEN_PASS_DECL_ACCIFCLAUSELOWERING
#endif // GEN_PASS_DECL_ACCIFCLAUSELOWERING
#ifdef GEN_PASS_DEF_ACCIFCLAUSELOWERING

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Lower if clauses in ACC compute constructs)PD"; }

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

  /// 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<mlir::scf::SCFDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// ACCImplicitData
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCIMPLICITDATA
struct ACCImplicitDataOptions {
  bool enableImplicitReductionCopy = true;
  bool ignoreDefaultNone = false;
};
std::unique_ptr<::mlir::Pass> createACCImplicitData();
std::unique_ptr<::mlir::Pass> createACCImplicitData(ACCImplicitDataOptions options);
#undef GEN_PASS_DECL_ACCIMPLICITDATA
#endif // GEN_PASS_DECL_ACCIMPLICITDATA
#ifdef GEN_PASS_DEF_ACCIMPLICITDATA

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createACCImplicitData(ACCImplicitDataOptions options);
} // namespace impl
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Generate implicit data attributes for OpenACC compute constructs)PD"; }

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

  /// 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<mlir::memref::MemRefDialect>();
    registry.insert<mlir::arith::ArithDialect>();
  }

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

  ACCImplicitDataBase(ACCImplicitDataOptions options) : ACCImplicitDataBase() {
    enableImplicitReductionCopy = std::move(options.enableImplicitReductionCopy);
    ignoreDefaultNone = std::move(options.ignoreDefaultNone);
  }
protected:
  ::mlir::Pass::Option<bool> enableImplicitReductionCopy{*this, "enable-implicit-reduction-copy", ::llvm::cl::desc(R"PO(Enable applying implicit copy in lieu of implicit firstprivate for reduction variables. This allows uniform treatment of reduction variables between combined constructs (e.g., 'parallel loop') and separate constructs (e.g., 'parallel' followed by 'loop'), where the OpenACC spec requires copy semantics for the former but firstprivate would normally apply for the latter.)PO"), ::llvm::cl::init(true)};
  ::mlir::Pass::Option<bool> ignoreDefaultNone{*this, "ignore-default-none", ::llvm::cl::desc(R"PO(When disabled (default), if the region has a default(none) clause, this pass does not generate implicit data attributes. When enabled, implicit data is generated even with default(none). This is useful when the frontend has robust default(none) verification: user variables are already verified, so any remaining live-ins are variables that still need mapping handling.)PO"), ::llvm::cl::init(false)};
private:

  friend std::unique_ptr<::mlir::Pass> createACCImplicitData() {
    return std::make_unique<DerivedT>();
  }

  friend std::unique_ptr<::mlir::Pass> createACCImplicitData(ACCImplicitDataOptions options) {
    return std::make_unique<DerivedT>(std::move(options));
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createACCImplicitData() {
  return impl::createACCImplicitData();
}

std::unique_ptr<::mlir::Pass> createACCImplicitData(ACCImplicitDataOptions options) {
  return impl::createACCImplicitData(std::move(options));
}
#undef GEN_PASS_DEF_ACCIMPLICITDATA
#endif // GEN_PASS_DEF_ACCIMPLICITDATA

//===----------------------------------------------------------------------===//
// ACCImplicitDeclare
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCIMPLICITDECLARE
std::unique_ptr<::mlir::Pass> createACCImplicitDeclare();
#undef GEN_PASS_DECL_ACCIMPLICITDECLARE
#endif // GEN_PASS_DECL_ACCIMPLICITDECLARE
#ifdef GEN_PASS_DEF_ACCIMPLICITDECLARE

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Applies implicit acc declare to globals referenced in compute and routine acc regions)PD"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// ACCImplicitRoutine
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCIMPLICITROUTINE
struct ACCImplicitRoutineOptions {
  mlir::acc::DeviceType deviceType = mlir::acc::DeviceType::None;
};
std::unique_ptr<::mlir::Pass> createACCImplicitRoutine();
std::unique_ptr<::mlir::Pass> createACCImplicitRoutine(ACCImplicitRoutineOptions options);
#undef GEN_PASS_DECL_ACCIMPLICITROUTINE
#endif // GEN_PASS_DECL_ACCIMPLICITROUTINE
#ifdef GEN_PASS_DEF_ACCIMPLICITROUTINE

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createACCImplicitRoutine(ACCImplicitRoutineOptions options);
} // namespace impl
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Generate implicit acc routine for functions in acc regions)PD"; }

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

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

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

  ACCImplicitRoutineBase(ACCImplicitRoutineOptions options) : ACCImplicitRoutineBase() {
    deviceType = std::move(options.deviceType);
  }
protected:
  ::mlir::Pass::Option<mlir::acc::DeviceType> deviceType{*this, "device-type", ::llvm::cl::desc(R"PO(Target device type. One use case is ensuring that device_type-specific clauses are considered. Another is device-specific specializations.)PO"), ::llvm::cl::init(mlir::acc::DeviceType::None), ::llvm::cl::values(
       clEnumValN(mlir::acc::DeviceType::None, "none", "none"),
       clEnumValN(mlir::acc::DeviceType::Host, "host", "host"),
       clEnumValN(mlir::acc::DeviceType::Multicore, "multicore", "multicore"),
       clEnumValN(mlir::acc::DeviceType::Nvidia, "nvidia", "nvidia"),
       clEnumValN(mlir::acc::DeviceType::Radeon, "radeon", "radeon"))
    };
private:

  friend std::unique_ptr<::mlir::Pass> createACCImplicitRoutine() {
    return std::make_unique<DerivedT>();
  }

  friend std::unique_ptr<::mlir::Pass> createACCImplicitRoutine(ACCImplicitRoutineOptions options) {
    return std::make_unique<DerivedT>(std::move(options));
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createACCImplicitRoutine() {
  return impl::createACCImplicitRoutine();
}

std::unique_ptr<::mlir::Pass> createACCImplicitRoutine(ACCImplicitRoutineOptions options) {
  return impl::createACCImplicitRoutine(std::move(options));
}
#undef GEN_PASS_DEF_ACCIMPLICITROUTINE
#endif // GEN_PASS_DEF_ACCIMPLICITROUTINE

//===----------------------------------------------------------------------===//
// ACCLegalizeSerial
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCLEGALIZESERIAL
std::unique_ptr<::mlir::Pass> createACCLegalizeSerial();
#undef GEN_PASS_DECL_ACCLEGALIZESERIAL
#endif // GEN_PASS_DECL_ACCLEGALIZESERIAL
#ifdef GEN_PASS_DEF_ACCLEGALIZESERIAL

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Legalize OpenACC serial constructs)PD"; }

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

  /// 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<mlir::arith::ArithDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// ACCLoopTiling
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCLOOPTILING
struct ACCLoopTilingOptions {
  int32_t defaultTileSize = 32;
};
std::unique_ptr<::mlir::Pass> createACCLoopTiling();
std::unique_ptr<::mlir::Pass> createACCLoopTiling(ACCLoopTilingOptions options);
#undef GEN_PASS_DECL_ACCLOOPTILING
#endif // GEN_PASS_DECL_ACCLOOPTILING
#ifdef GEN_PASS_DEF_ACCLOOPTILING

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createACCLoopTiling(ACCLoopTilingOptions options);
} // namespace impl
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Tile OpenACC loops with tile clauses)PD"; }

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

  /// 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<mlir::arith::ArithDialect>();
  }

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

  ACCLoopTilingBase(ACCLoopTilingOptions options) : ACCLoopTilingBase() {
    defaultTileSize = std::move(options.defaultTileSize);
  }
protected:
  ::mlir::Pass::Option<int32_t> defaultTileSize{*this, "default-tile-size", ::llvm::cl::desc(R"PO(Default tile size to use for wildcard ('*') tile sizes)PO"), ::llvm::cl::init(32)};
private:

  friend std::unique_ptr<::mlir::Pass> createACCLoopTiling() {
    return std::make_unique<DerivedT>();
  }

  friend std::unique_ptr<::mlir::Pass> createACCLoopTiling(ACCLoopTilingOptions options) {
    return std::make_unique<DerivedT>(std::move(options));
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createACCLoopTiling() {
  return impl::createACCLoopTiling();
}

std::unique_ptr<::mlir::Pass> createACCLoopTiling(ACCLoopTilingOptions options) {
  return impl::createACCLoopTiling(std::move(options));
}
#undef GEN_PASS_DEF_ACCLOOPTILING
#endif // GEN_PASS_DEF_ACCLOOPTILING

//===----------------------------------------------------------------------===//
// ACCRecipeMaterialization
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCRECIPEMATERIALIZATION
std::unique_ptr<::mlir::Pass> createACCRecipeMaterialization();
#undef GEN_PASS_DECL_ACCRECIPEMATERIALIZATION
#endif // GEN_PASS_DECL_ACCRECIPEMATERIALIZATION
#ifdef GEN_PASS_DEF_ACCRECIPEMATERIALIZATION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Materialize OpenACC private, firstprivate and reduction recipes)PD"; }

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

  /// 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<mlir::arith::ArithDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// ACCRoutineLowering
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCROUTINELOWERING
struct ACCRoutineLoweringOptions {
  mlir::acc::DeviceType deviceType = mlir::acc::DeviceType::None;
};
std::unique_ptr<::mlir::Pass> createACCRoutineLowering();
std::unique_ptr<::mlir::Pass> createACCRoutineLowering(ACCRoutineLoweringOptions options);
#undef GEN_PASS_DECL_ACCROUTINELOWERING
#endif // GEN_PASS_DECL_ACCROUTINELOWERING
#ifdef GEN_PASS_DEF_ACCROUTINELOWERING

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createACCRoutineLowering(ACCRoutineLoweringOptions options);
} // namespace impl
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Specialize `acc routine` functions for device)PD"; }

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

  /// 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<mlir::func::FuncDialect>();
    registry.insert<mlir::scf::SCFDialect>();
  }

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

  ACCRoutineLoweringBase(ACCRoutineLoweringOptions options) : ACCRoutineLoweringBase() {
    deviceType = std::move(options.deviceType);
  }
protected:
  ::mlir::Pass::Option<mlir::acc::DeviceType> deviceType{*this, "device-type", ::llvm::cl::desc(R"PO(Target device type. One use case is ensuring that device_type-specific clauses are considered. Another is device-specific specializations.)PO"), ::llvm::cl::init(mlir::acc::DeviceType::None), ::llvm::cl::values(
       clEnumValN(mlir::acc::DeviceType::None, "none", "none"),
       clEnumValN(mlir::acc::DeviceType::Host, "host", "host"),
       clEnumValN(mlir::acc::DeviceType::Multicore, "multicore", "multicore"),
       clEnumValN(mlir::acc::DeviceType::Nvidia, "nvidia", "nvidia"),
       clEnumValN(mlir::acc::DeviceType::Radeon, "radeon", "radeon"))
    };
private:

  friend std::unique_ptr<::mlir::Pass> createACCRoutineLowering() {
    return std::make_unique<DerivedT>();
  }

  friend std::unique_ptr<::mlir::Pass> createACCRoutineLowering(ACCRoutineLoweringOptions options) {
    return std::make_unique<DerivedT>(std::move(options));
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createACCRoutineLowering() {
  return impl::createACCRoutineLowering();
}

std::unique_ptr<::mlir::Pass> createACCRoutineLowering(ACCRoutineLoweringOptions options) {
  return impl::createACCRoutineLowering(std::move(options));
}
#undef GEN_PASS_DEF_ACCROUTINELOWERING
#endif // GEN_PASS_DEF_ACCROUTINELOWERING

//===----------------------------------------------------------------------===//
// ACCRoutineToGPUFunc
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCROUTINETOGPUFUNC
struct ACCRoutineToGPUFuncOptions {
  mlir::acc::DeviceType deviceType = mlir::acc::DeviceType::None;
};
std::unique_ptr<::mlir::Pass> createACCRoutineToGPUFunc();
std::unique_ptr<::mlir::Pass> createACCRoutineToGPUFunc(ACCRoutineToGPUFuncOptions options);
#undef GEN_PASS_DECL_ACCROUTINETOGPUFUNC
#endif // GEN_PASS_DECL_ACCROUTINETOGPUFUNC
#ifdef GEN_PASS_DEF_ACCROUTINETOGPUFUNC

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createACCRoutineToGPUFunc(ACCRoutineToGPUFuncOptions options);
} // namespace impl
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Move ACC routine functions into the GPU module as gpu.func)PD"; }

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

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

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

  ACCRoutineToGPUFuncBase(ACCRoutineToGPUFuncOptions options) : ACCRoutineToGPUFuncBase() {
    deviceType = std::move(options.deviceType);
  }
protected:
  ::mlir::Pass::Option<mlir::acc::DeviceType> deviceType{*this, "device-type", ::llvm::cl::desc(R"PO(Target device type. One use case is ensuring that device_type-specific clauses are considered. Another is device-specific specializations.)PO"), ::llvm::cl::init(mlir::acc::DeviceType::None), ::llvm::cl::values(
       clEnumValN(mlir::acc::DeviceType::None, "none", "none"),
       clEnumValN(mlir::acc::DeviceType::Host, "host", "host"),
       clEnumValN(mlir::acc::DeviceType::Multicore, "multicore", "multicore"),
       clEnumValN(mlir::acc::DeviceType::Nvidia, "nvidia", "nvidia"),
       clEnumValN(mlir::acc::DeviceType::Radeon, "radeon", "radeon"))
    };
private:

  friend std::unique_ptr<::mlir::Pass> createACCRoutineToGPUFunc() {
    return std::make_unique<DerivedT>();
  }

  friend std::unique_ptr<::mlir::Pass> createACCRoutineToGPUFunc(ACCRoutineToGPUFuncOptions options) {
    return std::make_unique<DerivedT>(std::move(options));
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createACCRoutineToGPUFunc() {
  return impl::createACCRoutineToGPUFunc();
}

std::unique_ptr<::mlir::Pass> createACCRoutineToGPUFunc(ACCRoutineToGPUFuncOptions options) {
  return impl::createACCRoutineToGPUFunc(std::move(options));
}
#undef GEN_PASS_DEF_ACCROUTINETOGPUFUNC
#endif // GEN_PASS_DEF_ACCROUTINETOGPUFUNC

//===----------------------------------------------------------------------===//
// ACCSpecializeForDevice
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCSPECIALIZEFORDEVICE
std::unique_ptr<::mlir::Pass> createACCSpecializeForDevice();
#undef GEN_PASS_DECL_ACCSPECIALIZEFORDEVICE
#endif // GEN_PASS_DECL_ACCSPECIALIZEFORDEVICE
#ifdef GEN_PASS_DEF_ACCSPECIALIZEFORDEVICE

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Strip OpenACC constructs inside device code)PD"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// ACCSpecializeForHost
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ACCSPECIALIZEFORHOST
struct ACCSpecializeForHostOptions {
  bool enableHostFallback = false;
};
std::unique_ptr<::mlir::Pass> createACCSpecializeForHost();
std::unique_ptr<::mlir::Pass> createACCSpecializeForHost(ACCSpecializeForHostOptions options);
#undef GEN_PASS_DECL_ACCSPECIALIZEFORHOST
#endif // GEN_PASS_DECL_ACCSPECIALIZEFORHOST
#ifdef GEN_PASS_DEF_ACCSPECIALIZEFORHOST

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createACCSpecializeForHost(ACCSpecializeForHostOptions options);
} // namespace impl
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert OpenACC operations for host execution)PD"; }

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

  /// 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<mlir::scf::SCFDialect>();
  }

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

  ACCSpecializeForHostBase(ACCSpecializeForHostOptions options) : ACCSpecializeForHostBase() {
    enableHostFallback = std::move(options.enableHostFallback);
  }
protected:
  ::mlir::Pass::Option<bool> enableHostFallback{*this, "enable-host-fallback", ::llvm::cl::desc(R"PO(Enable host fallback mode which converts ALL ACC operations, not just orphan operations. Use this when the `if` clause evaluates to false.)PO"), ::llvm::cl::init(false)};
private:

  friend std::unique_ptr<::mlir::Pass> createACCSpecializeForHost() {
    return std::make_unique<DerivedT>();
  }

  friend std::unique_ptr<::mlir::Pass> createACCSpecializeForHost(ACCSpecializeForHostOptions options) {
    return std::make_unique<DerivedT>(std::move(options));
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createACCSpecializeForHost() {
  return impl::createACCSpecializeForHost();
}

std::unique_ptr<::mlir::Pass> createACCSpecializeForHost(ACCSpecializeForHostOptions options) {
  return impl::createACCSpecializeForHost(std::move(options));
}
#undef GEN_PASS_DEF_ACCSPECIALIZEFORHOST
#endif // GEN_PASS_DEF_ACCSPECIALIZEFORHOST

//===----------------------------------------------------------------------===//
// LegalizeDataValuesInRegion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LEGALIZEDATAVALUESINREGION
struct LegalizeDataValuesInRegionOptions {
  bool hostToDevice = true;
  bool applyToAccDataConstruct = true;
};
std::unique_ptr<::mlir::Pass> createLegalizeDataValuesInRegion();
std::unique_ptr<::mlir::Pass> createLegalizeDataValuesInRegion(LegalizeDataValuesInRegionOptions options);
#undef GEN_PASS_DECL_LEGALIZEDATAVALUESINREGION
#endif // GEN_PASS_DECL_LEGALIZEDATAVALUESINREGION
#ifdef GEN_PASS_DEF_LEGALIZEDATAVALUESINREGION

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createLegalizeDataValuesInRegion(LegalizeDataValuesInRegionOptions options);
} // namespace impl
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Legalizes SSA values in compute regions with results from data clause operations)PD"; }

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

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

  LegalizeDataValuesInRegionBase(LegalizeDataValuesInRegionOptions options) : LegalizeDataValuesInRegionBase() {
    hostToDevice = std::move(options.hostToDevice);
    applyToAccDataConstruct = std::move(options.applyToAccDataConstruct);
  }
protected:
  ::mlir::Pass::Option<bool> hostToDevice{*this, "host-to-device", ::llvm::cl::desc(R"PO(Replace varPtr uses with accPtr if true. Replace accPtr uses with varPtr if false)PO"), ::llvm::cl::init(true)};
  ::mlir::Pass::Option<bool> applyToAccDataConstruct{*this, "apply-to-acc-data-construct", ::llvm::cl::desc(R"PO(Replaces varPtr uses with accPtr for acc compute regions contained within acc.data or acc.declare region.)PO"), ::llvm::cl::init(true)};
private:

  friend std::unique_ptr<::mlir::Pass> createLegalizeDataValuesInRegion() {
    return std::make_unique<DerivedT>();
  }

  friend std::unique_ptr<::mlir::Pass> createLegalizeDataValuesInRegion(LegalizeDataValuesInRegionOptions options) {
    return std::make_unique<DerivedT>(std::move(options));
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createLegalizeDataValuesInRegion() {
  return impl::createLegalizeDataValuesInRegion();
}

std::unique_ptr<::mlir::Pass> createLegalizeDataValuesInRegion(LegalizeDataValuesInRegionOptions options) {
  return impl::createLegalizeDataValuesInRegion(std::move(options));
}
#undef GEN_PASS_DEF_LEGALIZEDATAVALUESINREGION
#endif // GEN_PASS_DEF_LEGALIZEDATAVALUESINREGION

//===----------------------------------------------------------------------===//
// OffloadLiveInValueCanonicalization
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_OFFLOADLIVEINVALUECANONICALIZATION
std::unique_ptr<::mlir::Pass> createOffloadLiveInValueCanonicalization();
#undef GEN_PASS_DECL_OFFLOADLIVEINVALUECANONICALIZATION
#endif // GEN_PASS_DECL_OFFLOADLIVEINVALUECANONICALIZATION
#ifdef GEN_PASS_DEF_OFFLOADLIVEINVALUECANONICALIZATION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Canonicalize live-in values for regions destined for outlining)PD"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// OffloadTargetVerifier
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_OFFLOADTARGETVERIFIER
struct OffloadTargetVerifierOptions {
  mlir::acc::DeviceType deviceType = mlir::acc::DeviceType::None;
  bool softCheck = false;
};
std::unique_ptr<::mlir::Pass> createOffloadTargetVerifier();
std::unique_ptr<::mlir::Pass> createOffloadTargetVerifier(OffloadTargetVerifierOptions options);
#undef GEN_PASS_DECL_OFFLOADTARGETVERIFIER
#endif // GEN_PASS_DECL_OFFLOADTARGETVERIFIER
#ifdef GEN_PASS_DEF_OFFLOADTARGETVERIFIER

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createOffloadTargetVerifier(OffloadTargetVerifierOptions options);
} // namespace impl
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Verify values and symbols live into offload regions for legality)PD"; }

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

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

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

  OffloadTargetVerifierBase(OffloadTargetVerifierOptions options) : OffloadTargetVerifierBase() {
    deviceType = std::move(options.deviceType);
    softCheck = std::move(options.softCheck);
  }
protected:
  ::mlir::Pass::Option<mlir::acc::DeviceType> deviceType{*this, "device-type", ::llvm::cl::desc(R"PO(Target device type. One use case is ensuring that device_type-specific clauses are considered. Another is device-specific specializations.)PO"), ::llvm::cl::init(mlir::acc::DeviceType::None), ::llvm::cl::values(
       clEnumValN(mlir::acc::DeviceType::None, "none", "none"),
       clEnumValN(mlir::acc::DeviceType::Host, "host", "host"),
       clEnumValN(mlir::acc::DeviceType::Multicore, "multicore", "multicore"),
       clEnumValN(mlir::acc::DeviceType::Nvidia, "nvidia", "nvidia"),
       clEnumValN(mlir::acc::DeviceType::Radeon, "radeon", "radeon"))
    };
  ::mlir::Pass::Option<bool> softCheck{*this, "soft-check", ::llvm::cl::desc(R"PO(When true, illegal values are printed via LLVM_DEBUG instead of failing compilation. Useful for diagnostic purposes.)PO"), ::llvm::cl::init(false)};
private:

  friend std::unique_ptr<::mlir::Pass> createOffloadTargetVerifier() {
    return std::make_unique<DerivedT>();
  }

  friend std::unique_ptr<::mlir::Pass> createOffloadTargetVerifier(OffloadTargetVerifierOptions options) {
    return std::make_unique<DerivedT>(std::move(options));
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createOffloadTargetVerifier() {
  return impl::createOffloadTargetVerifier();
}

std::unique_ptr<::mlir::Pass> createOffloadTargetVerifier(OffloadTargetVerifierOptions options) {
  return impl::createOffloadTargetVerifier(std::move(options));
}
#undef GEN_PASS_DEF_OFFLOADTARGETVERIFIER
#endif // GEN_PASS_DEF_OFFLOADTARGETVERIFIER
#ifdef GEN_PASS_REGISTRATION
// Generate registrations for all passes.
#define GEN_PASS_REGISTRATION_ACCBINDROUTINE
#define GEN_PASS_REGISTRATION_ACCCOMPUTELOWERING
#define GEN_PASS_REGISTRATION_ACCDECLAREGPUMODULEINSERTION
#define GEN_PASS_REGISTRATION_ACCEMITREMARKSLOOP
#define GEN_PASS_REGISTRATION_ACCEMITREMARKSPRIVATE
#define GEN_PASS_REGISTRATION_ACCIFCLAUSELOWERING
#define GEN_PASS_REGISTRATION_ACCIMPLICITDATA
#define GEN_PASS_REGISTRATION_ACCIMPLICITDECLARE
#define GEN_PASS_REGISTRATION_ACCIMPLICITROUTINE
#define GEN_PASS_REGISTRATION_ACCLEGALIZESERIAL
#define GEN_PASS_REGISTRATION_ACCLOOPTILING
#define GEN_PASS_REGISTRATION_ACCRECIPEMATERIALIZATION
#define GEN_PASS_REGISTRATION_ACCROUTINELOWERING
#define GEN_PASS_REGISTRATION_ACCROUTINETOGPUFUNC
#define GEN_PASS_REGISTRATION_ACCSPECIALIZEFORDEVICE
#define GEN_PASS_REGISTRATION_ACCSPECIALIZEFORHOST
#define GEN_PASS_REGISTRATION_LEGALIZEDATAVALUESINREGION
#define GEN_PASS_REGISTRATION_OFFLOADLIVEINVALUECANONICALIZATION
#define GEN_PASS_REGISTRATION_OFFLOADTARGETVERIFIER
#endif // GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// ACCBindRoutine Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCBINDROUTINE

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

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

#undef GEN_PASS_REGISTRATION_ACCBINDROUTINE
#endif // GEN_PASS_REGISTRATION_ACCBINDROUTINE

//===----------------------------------------------------------------------===//
// ACCComputeLowering Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCCOMPUTELOWERING

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

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

#undef GEN_PASS_REGISTRATION_ACCCOMPUTELOWERING
#endif // GEN_PASS_REGISTRATION_ACCCOMPUTELOWERING

//===----------------------------------------------------------------------===//
// ACCDeclareGPUModuleInsertion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCDECLAREGPUMODULEINSERTION

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

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

#undef GEN_PASS_REGISTRATION_ACCDECLAREGPUMODULEINSERTION
#endif // GEN_PASS_REGISTRATION_ACCDECLAREGPUMODULEINSERTION

//===----------------------------------------------------------------------===//
// ACCEmitRemarksLoop Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCEMITREMARKSLOOP

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

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

#undef GEN_PASS_REGISTRATION_ACCEMITREMARKSLOOP
#endif // GEN_PASS_REGISTRATION_ACCEMITREMARKSLOOP

//===----------------------------------------------------------------------===//
// ACCEmitRemarksPrivate Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCEMITREMARKSPRIVATE

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

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

#undef GEN_PASS_REGISTRATION_ACCEMITREMARKSPRIVATE
#endif // GEN_PASS_REGISTRATION_ACCEMITREMARKSPRIVATE

//===----------------------------------------------------------------------===//
// ACCIfClauseLowering Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCIFCLAUSELOWERING

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

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

#undef GEN_PASS_REGISTRATION_ACCIFCLAUSELOWERING
#endif // GEN_PASS_REGISTRATION_ACCIFCLAUSELOWERING

//===----------------------------------------------------------------------===//
// ACCImplicitData Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCIMPLICITDATA

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

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

#undef GEN_PASS_REGISTRATION_ACCIMPLICITDATA
#endif // GEN_PASS_REGISTRATION_ACCIMPLICITDATA

//===----------------------------------------------------------------------===//
// ACCImplicitDeclare Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCIMPLICITDECLARE

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

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

#undef GEN_PASS_REGISTRATION_ACCIMPLICITDECLARE
#endif // GEN_PASS_REGISTRATION_ACCIMPLICITDECLARE

//===----------------------------------------------------------------------===//
// ACCImplicitRoutine Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCIMPLICITROUTINE

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

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

#undef GEN_PASS_REGISTRATION_ACCIMPLICITROUTINE
#endif // GEN_PASS_REGISTRATION_ACCIMPLICITROUTINE

//===----------------------------------------------------------------------===//
// ACCLegalizeSerial Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCLEGALIZESERIAL

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

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

#undef GEN_PASS_REGISTRATION_ACCLEGALIZESERIAL
#endif // GEN_PASS_REGISTRATION_ACCLEGALIZESERIAL

//===----------------------------------------------------------------------===//
// ACCLoopTiling Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCLOOPTILING

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

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

#undef GEN_PASS_REGISTRATION_ACCLOOPTILING
#endif // GEN_PASS_REGISTRATION_ACCLOOPTILING

//===----------------------------------------------------------------------===//
// ACCRecipeMaterialization Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCRECIPEMATERIALIZATION

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

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

#undef GEN_PASS_REGISTRATION_ACCRECIPEMATERIALIZATION
#endif // GEN_PASS_REGISTRATION_ACCRECIPEMATERIALIZATION

//===----------------------------------------------------------------------===//
// ACCRoutineLowering Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCROUTINELOWERING

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

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

#undef GEN_PASS_REGISTRATION_ACCROUTINELOWERING
#endif // GEN_PASS_REGISTRATION_ACCROUTINELOWERING

//===----------------------------------------------------------------------===//
// ACCRoutineToGPUFunc Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCROUTINETOGPUFUNC

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

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

#undef GEN_PASS_REGISTRATION_ACCROUTINETOGPUFUNC
#endif // GEN_PASS_REGISTRATION_ACCROUTINETOGPUFUNC

//===----------------------------------------------------------------------===//
// ACCSpecializeForDevice Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCSPECIALIZEFORDEVICE

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

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

#undef GEN_PASS_REGISTRATION_ACCSPECIALIZEFORDEVICE
#endif // GEN_PASS_REGISTRATION_ACCSPECIALIZEFORDEVICE

//===----------------------------------------------------------------------===//
// ACCSpecializeForHost Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ACCSPECIALIZEFORHOST

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

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

#undef GEN_PASS_REGISTRATION_ACCSPECIALIZEFORHOST
#endif // GEN_PASS_REGISTRATION_ACCSPECIALIZEFORHOST

//===----------------------------------------------------------------------===//
// LegalizeDataValuesInRegion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_LEGALIZEDATAVALUESINREGION

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

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

#undef GEN_PASS_REGISTRATION_LEGALIZEDATAVALUESINREGION
#endif // GEN_PASS_REGISTRATION_LEGALIZEDATAVALUESINREGION

//===----------------------------------------------------------------------===//
// OffloadLiveInValueCanonicalization Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_OFFLOADLIVEINVALUECANONICALIZATION

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

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

#undef GEN_PASS_REGISTRATION_OFFLOADLIVEINVALUECANONICALIZATION
#endif // GEN_PASS_REGISTRATION_OFFLOADLIVEINVALUECANONICALIZATION

//===----------------------------------------------------------------------===//
// OffloadTargetVerifier Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_OFFLOADTARGETVERIFIER

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

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

#undef GEN_PASS_REGISTRATION_OFFLOADTARGETVERIFIER
#endif // GEN_PASS_REGISTRATION_OFFLOADTARGETVERIFIER
#ifdef GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// OpenACC Registration
//===----------------------------------------------------------------------===//

inline void registerOpenACCPasses() {
  registerACCBindRoutine();
  registerACCComputeLowering();
  registerACCDeclareGPUModuleInsertion();
  registerACCEmitRemarksLoop();
  registerACCEmitRemarksPrivate();
  registerACCIfClauseLowering();
  registerACCImplicitData();
  registerACCImplicitDeclare();
  registerACCImplicitRoutine();
  registerACCLegalizeSerial();
  registerACCLoopTiling();
  registerACCRecipeMaterialization();
  registerACCRoutineLowering();
  registerACCRoutineToGPUFunc();
  registerACCSpecializeForDevice();
  registerACCSpecializeForHost();
  registerLegalizeDataValuesInRegion();
  registerOffloadLiveInValueCanonicalization();
  registerOffloadTargetVerifier();
}
#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
