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

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_ABSTRACTRESULTOPT
#define GEN_PASS_DECL_ADDALIASTAGS
#define GEN_PASS_DECL_ADDDEBUGINFO
#define GEN_PASS_DECL_AFFINEDIALECTDEMOTION
#define GEN_PASS_DECL_AFFINEDIALECTPROMOTION
#define GEN_PASS_DECL_ALGEBRAICSIMPLIFICATION
#define GEN_PASS_DECL_ANNOTATECONSTANTOPERANDS
#define GEN_PASS_DECL_ARRAYVALUECOPY
#define GEN_PASS_DECL_ASSUMEDRANKOPCONVERSION
#define GEN_PASS_DECL_CFGCONVERSION
#define GEN_PASS_DECL_CUFADDCONSTRUCTOR
#define GEN_PASS_DECL_CUFALLOCATIONCONVERSION
#define GEN_PASS_DECL_CUFCOMPUTESHAREDMEMORYOFFSETSANDSIZE
#define GEN_PASS_DECL_CUFDEVICEFUNCTRANSFORM
#define GEN_PASS_DECL_CUFDEVICEGLOBAL
#define GEN_PASS_DECL_CUFFUNCTIONREWRITE
#define GEN_PASS_DECL_CUFGPUTOLLVMCONVERSION
#define GEN_PASS_DECL_CUFLAUNCHATTACHATTR
#define GEN_PASS_DECL_CUFOPCONVERSION
#define GEN_PASS_DECL_CUFPREDEFINEDVARTOGPU
#define GEN_PASS_DECL_CHARACTERCONVERSION
#define GEN_PASS_DECL_COMPILERGENERATEDNAMESCONVERSION
#define GEN_PASS_DECL_CONSTANTARGUMENTGLOBALISATIONOPT
#define GEN_PASS_DECL_CONVERTCOMPLEXPOW
#define GEN_PASS_DECL_EXTERNALNAMECONVERSION
#define GEN_PASS_DECL_FIRTOSCFPASS
#define GEN_PASS_DECL_FUNCTIONATTR
#define GEN_PASS_DECL_GENRUNTIMECALLSFORTEST
#define GEN_PASS_DECL_LOOPINVARIANTCODEMOTION
#define GEN_PASS_DECL_LOOPVERSIONING
#define GEN_PASS_DECL_MIFOPCONVERSION
#define GEN_PASS_DECL_MEMREFDATAFLOWOPT
#define GEN_PASS_DECL_MEMORYALLOCATIONOPT
#define GEN_PASS_DECL_OPTIMIZEARRAYREPACKING
#define GEN_PASS_DECL_POLYMORPHICOPCONVERSION
#define GEN_PASS_DECL_SETRUNTIMECALLATTRIBUTES
#define GEN_PASS_DECL_SIMPLIFYFIROPERATIONS
#define GEN_PASS_DECL_SIMPLIFYINTRINSICS
#define GEN_PASS_DECL_SIMPLIFYREGIONLITE
#define GEN_PASS_DECL_STACKARRAYS
#define GEN_PASS_DECL_STACKRECLAIM
#define GEN_PASS_DECL_VSCALEATTR
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// AbstractResultOpt
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ABSTRACTRESULTOPT
struct AbstractResultOptOptions {
  bool passResultAsBox = false;
};
std::unique_ptr<::mlir::Pass> createAbstractResultOpt();
std::unique_ptr<::mlir::Pass> createAbstractResultOpt(AbstractResultOptOptions options);
#undef GEN_PASS_DECL_ABSTRACTRESULTOPT
#endif // GEN_PASS_DECL_ABSTRACTRESULTOPT
#ifdef GEN_PASS_DEF_ABSTRACTRESULTOPT

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert fir.array, fir.box and fir.rec function result to function argument)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::func::FuncDialect>();
  }

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

  AbstractResultOptBase(AbstractResultOptOptions options) : AbstractResultOptBase() {
    passResultAsBox = std::move(options.passResultAsBox);
  }
protected:
  ::mlir::Pass::Option<bool> passResultAsBox{*this, "abstract-result-as-box", ::llvm::cl::desc(R"PO(Pass fir.array<T> result as fir.box<fir.array<T>> argument instead of fir.ref<fir.array<T>>.)PO"), ::llvm::cl::init(false)};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createAbstractResultOpt(AbstractResultOptOptions options) {
  return impl::createAbstractResultOpt(std::move(options));
}
#undef GEN_PASS_DEF_ABSTRACTRESULTOPT
#endif // GEN_PASS_DEF_ABSTRACTRESULTOPT

//===----------------------------------------------------------------------===//
// AddAliasTags
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ADDALIASTAGS
std::unique_ptr<::mlir::Pass> createAddAliasTags();
#undef GEN_PASS_DECL_ADDALIASTAGS
#endif // GEN_PASS_DECL_ADDALIASTAGS
#ifdef GEN_PASS_DEF_ADDALIASTAGS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Add tbaa tags to operations that implement FirAliasAnalysisOpInterface)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<mlir::LLVM::LLVMDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AddAliasTagsBase<DerivedT>)

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// AddDebugInfo
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ADDDEBUGINFO
struct AddDebugInfoOptions {
  mlir::LLVM::DIEmissionKind debugLevel = mlir::LLVM::DIEmissionKind::Full;
  bool isOptimized = false;
  std::string inputFilename = std::string{};
  int32_t dwarfVersion = 0;
  std::string splitDwarfFile = std::string{};
};
#undef GEN_PASS_DECL_ADDDEBUGINFO
#endif // GEN_PASS_DECL_ADDDEBUGINFO
#ifdef GEN_PASS_DEF_ADDDEBUGINFO
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Add the debug info)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::func::FuncDialect>();
    registry.insert<mlir::LLVM::LLVMDialect>();
    registry.insert<mlir::DLTIDialect>();
  }

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

  AddDebugInfoBase(AddDebugInfoOptions options) : AddDebugInfoBase() {
    debugLevel = std::move(options.debugLevel);
    isOptimized = std::move(options.isOptimized);
    inputFilename = std::move(options.inputFilename);
    dwarfVersion = std::move(options.dwarfVersion);
    splitDwarfFile = std::move(options.splitDwarfFile);
  }
protected:
  ::mlir::Pass::Option<mlir::LLVM::DIEmissionKind> debugLevel{*this, "debug-level", ::llvm::cl::desc(R"PO(debug level)PO"), ::llvm::cl::init(mlir::LLVM::DIEmissionKind::Full), ::llvm::cl::values(
            clEnumValN(mlir::LLVM::DIEmissionKind::Full, "Full", "Emit full debug info"),
            clEnumValN(mlir::LLVM::DIEmissionKind::LineTablesOnly, "LineTablesOnly", "Emit line tables only"),
            clEnumValN(mlir::LLVM::DIEmissionKind::None, "None", "Emit no debug information")
          )};
  ::mlir::Pass::Option<bool> isOptimized{*this, "is-optimized", ::llvm::cl::desc(R"PO(is optimized.)PO"), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<std::string> inputFilename{*this, "file-name", ::llvm::cl::desc(R"PO(name of the input source file)PO"), ::llvm::cl::init(std::string{})};
  ::mlir::Pass::Option<int32_t> dwarfVersion{*this, "dwarf-version", ::llvm::cl::desc(R"PO(dwarf version)PO"), ::llvm::cl::init(0)};
  ::mlir::Pass::Option<std::string> splitDwarfFile{*this, "split-dwarf-file", ::llvm::cl::desc(R"PO(Name of the split dwarf file)PO"), ::llvm::cl::init(std::string{})};
private:
};
} // namespace impl
#undef GEN_PASS_DEF_ADDDEBUGINFO
#endif // GEN_PASS_DEF_ADDDEBUGINFO

//===----------------------------------------------------------------------===//
// AffineDialectDemotion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_AFFINEDIALECTDEMOTION
#undef GEN_PASS_DECL_AFFINEDIALECTDEMOTION
#endif // GEN_PASS_DECL_AFFINEDIALECTDEMOTION
#ifdef GEN_PASS_DEF_AFFINEDIALECTDEMOTION
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Converts `affine.{load,store}` back to fir operations)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::func::FuncDialect>();
    registry.insert<mlir::affine::AffineDialect>();
  }

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

protected:
private:
};
} // namespace impl
#undef GEN_PASS_DEF_AFFINEDIALECTDEMOTION
#endif // GEN_PASS_DEF_AFFINEDIALECTDEMOTION

//===----------------------------------------------------------------------===//
// AffineDialectPromotion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_AFFINEDIALECTPROMOTION
#undef GEN_PASS_DECL_AFFINEDIALECTPROMOTION
#endif // GEN_PASS_DECL_AFFINEDIALECTPROMOTION
#ifdef GEN_PASS_DEF_AFFINEDIALECTPROMOTION
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Promotes `fir.{do_loop,if}` to `affine.{for,if}`.)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::func::FuncDialect>();
    registry.insert<mlir::affine::AffineDialect>();
  }

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

protected:
private:
};
} // namespace impl
#undef GEN_PASS_DEF_AFFINEDIALECTPROMOTION
#endif // GEN_PASS_DEF_AFFINEDIALECTPROMOTION

//===----------------------------------------------------------------------===//
// AlgebraicSimplification
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ALGEBRAICSIMPLIFICATION
#undef GEN_PASS_DECL_ALGEBRAICSIMPLIFICATION
#endif // GEN_PASS_DECL_ALGEBRAICSIMPLIFICATION
#ifdef GEN_PASS_DEF_ALGEBRAICSIMPLIFICATION
namespace impl {

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

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

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

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

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

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

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

protected:
private:
};
} // namespace impl
#undef GEN_PASS_DEF_ALGEBRAICSIMPLIFICATION
#endif // GEN_PASS_DEF_ALGEBRAICSIMPLIFICATION

//===----------------------------------------------------------------------===//
// AnnotateConstantOperands
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ANNOTATECONSTANTOPERANDS
#undef GEN_PASS_DECL_ANNOTATECONSTANTOPERANDS
#endif // GEN_PASS_DECL_ANNOTATECONSTANTOPERANDS
#ifdef GEN_PASS_DEF_ANNOTATECONSTANTOPERANDS
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Annotate constant operands to all FIR operations)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AnnotateConstantOperandsBase<DerivedT>)

protected:
private:
};
} // namespace impl
#undef GEN_PASS_DEF_ANNOTATECONSTANTOPERANDS
#endif // GEN_PASS_DEF_ANNOTATECONSTANTOPERANDS

//===----------------------------------------------------------------------===//
// ArrayValueCopy
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ARRAYVALUECOPY
struct ArrayValueCopyOptions {
  bool optimizeConflicts = false;
};
#undef GEN_PASS_DECL_ARRAYVALUECOPY
#endif // GEN_PASS_DECL_ARRAYVALUECOPY
#ifdef GEN_PASS_DEF_ARRAYVALUECOPY
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert array value operations to memory operations.)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ArrayValueCopyBase<DerivedT>)

  ArrayValueCopyBase(ArrayValueCopyOptions options) : ArrayValueCopyBase() {
    optimizeConflicts = std::move(options.optimizeConflicts);
  }
protected:
  ::mlir::Pass::Option<bool> optimizeConflicts{*this, "optimize-conflicts", ::llvm::cl::desc(R"PO(do more detailed conflict analysis to reduce the number of temporaries)PO"), ::llvm::cl::init(false)};
private:
};
} // namespace impl
#undef GEN_PASS_DEF_ARRAYVALUECOPY
#endif // GEN_PASS_DEF_ARRAYVALUECOPY

//===----------------------------------------------------------------------===//
// AssumedRankOpConversion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_ASSUMEDRANKOPCONVERSION
std::unique_ptr<::mlir::Pass> createAssumedRankOpConversion();
#undef GEN_PASS_DECL_ASSUMEDRANKOPCONVERSION
#endif // GEN_PASS_DECL_ASSUMEDRANKOPCONVERSION
#ifdef GEN_PASS_DEF_ASSUMEDRANKOPCONVERSION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Simplify operations on assumed-rank types)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::func::FuncDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// CFGConversion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CFGCONVERSION
struct CFGConversionOptions {
  bool forceLoopToExecuteOnce = false;
  bool setNSW = true;
};
std::unique_ptr<::mlir::Pass> createCFGConversion();
std::unique_ptr<::mlir::Pass> createCFGConversion(CFGConversionOptions options);
#undef GEN_PASS_DECL_CFGCONVERSION
#endif // GEN_PASS_DECL_CFGCONVERSION
#ifdef GEN_PASS_DEF_CFGCONVERSION

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert FIR structured control flow ops to CFG ops.)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::func::FuncDialect>();
  }

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

  CFGConversionBase(CFGConversionOptions options) : CFGConversionBase() {
    forceLoopToExecuteOnce = std::move(options.forceLoopToExecuteOnce);
    setNSW = std::move(options.setNSW);
  }
protected:
  ::mlir::Pass::Option<bool> forceLoopToExecuteOnce{*this, "always-execute-loop-body", ::llvm::cl::desc(R"PO(force the body of a loop to execute at least once)PO"), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> setNSW{*this, "set-nsw", ::llvm::cl::desc(R"PO(set nsw on loop variable increment)PO"), ::llvm::cl::init(true)};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createCFGConversion(CFGConversionOptions options) {
  return impl::createCFGConversion(std::move(options));
}
#undef GEN_PASS_DEF_CFGCONVERSION
#endif // GEN_PASS_DEF_CFGCONVERSION

//===----------------------------------------------------------------------===//
// CUFAddConstructor
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CUFADDCONSTRUCTOR
std::unique_ptr<::mlir::Pass> createCUFAddConstructor();
#undef GEN_PASS_DECL_CUFADDCONSTRUCTOR
#endif // GEN_PASS_DECL_CUFADDCONSTRUCTOR
#ifdef GEN_PASS_DEF_CUFADDCONSTRUCTOR

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Add constructor to register CUDA Fortran allocators)PD"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// CUFAllocationConversion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CUFALLOCATIONCONVERSION
std::unique_ptr<::mlir::Pass> createCUFAllocationConversion();
#undef GEN_PASS_DECL_CUFALLOCATIONCONVERSION
#endif // GEN_PASS_DECL_CUFALLOCATIONCONVERSION
#ifdef GEN_PASS_DEF_CUFALLOCATIONCONVERSION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert allocation related CUF operations to runtime calls)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CUFAllocationConversionBase<DerivedT>)

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// CUFComputeSharedMemoryOffsetsAndSize
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CUFCOMPUTESHAREDMEMORYOFFSETSANDSIZE
std::unique_ptr<::mlir::Pass> createCUFComputeSharedMemoryOffsetsAndSize();
#undef GEN_PASS_DECL_CUFCOMPUTESHAREDMEMORYOFFSETSANDSIZE
#endif // GEN_PASS_DECL_CUFCOMPUTESHAREDMEMORYOFFSETSANDSIZE
#ifdef GEN_PASS_DEF_CUFCOMPUTESHAREDMEMORYOFFSETSANDSIZE

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Create the shared memory global variable and set offsets)PD"; }

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

  /// 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<cuf::CUFDialect>();
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::gpu::GPUDialect>();
    registry.insert<mlir::DLTIDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// CUFDeviceFuncTransform
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CUFDEVICEFUNCTRANSFORM
struct CUFDeviceFuncTransformOptions {
  int computeCap = 0;
};
std::unique_ptr<::mlir::Pass> createCUFDeviceFuncTransform();
std::unique_ptr<::mlir::Pass> createCUFDeviceFuncTransform(CUFDeviceFuncTransformOptions options);
#undef GEN_PASS_DECL_CUFDEVICEFUNCTRANSFORM
#endif // GEN_PASS_DECL_CUFDEVICEFUNCTRANSFORM
#ifdef GEN_PASS_DEF_CUFDEVICEFUNCTRANSFORM

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Transform device function to GPU func)PD"; }

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

  /// 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>();
    registry.insert<mlir::cf::ControlFlowDialect>();
    registry.insert<mlir::NVVM::NVVMDialect>();
  }

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

  CUFDeviceFuncTransformBase(CUFDeviceFuncTransformOptions options) : CUFDeviceFuncTransformBase() {
    computeCap = std::move(options.computeCap);
  }
protected:
  ::mlir::Pass::Option<int> computeCap{*this, "compute-capability", ::llvm::cl::desc(R"PO(CUDA compute capability version)PO"), ::llvm::cl::init(0)};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createCUFDeviceFuncTransform(CUFDeviceFuncTransformOptions options) {
  return impl::createCUFDeviceFuncTransform(std::move(options));
}
#undef GEN_PASS_DEF_CUFDEVICEFUNCTRANSFORM
#endif // GEN_PASS_DEF_CUFDEVICEFUNCTRANSFORM

//===----------------------------------------------------------------------===//
// CUFDeviceGlobal
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CUFDEVICEGLOBAL
std::unique_ptr<::mlir::Pass> createCUFDeviceGlobal();
#undef GEN_PASS_DECL_CUFDEVICEGLOBAL
#endif // GEN_PASS_DECL_CUFDEVICEGLOBAL
#ifdef GEN_PASS_DEF_CUFDEVICEGLOBAL

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Flag globals used in device function with data attribute)PD"; }

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

  /// 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<cuf::CUFDialect>();
    registry.insert<mlir::gpu::GPUDialect>();
    registry.insert<mlir::NVVM::NVVMDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// CUFFunctionRewrite
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CUFFUNCTIONREWRITE
std::unique_ptr<::mlir::Pass> createCUFFunctionRewrite();
#undef GEN_PASS_DECL_CUFFUNCTIONREWRITE
#endif // GEN_PASS_DECL_CUFFUNCTIONREWRITE
#ifdef GEN_PASS_DEF_CUFFUNCTIONREWRITE

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert some CUDA Fortran specific call)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CUFFunctionRewriteBase<DerivedT>)

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// CUFGPUToLLVMConversion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CUFGPUTOLLVMCONVERSION
std::unique_ptr<::mlir::Pass> createCUFGPUToLLVMConversion();
#undef GEN_PASS_DECL_CUFGPUTOLLVMCONVERSION
#endif // GEN_PASS_DECL_CUFGPUTOLLVMCONVERSION
#ifdef GEN_PASS_DEF_CUFGPUTOLLVMCONVERSION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert some GPU operations lowered from CUF to runtime calls)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<mlir::LLVM::LLVMDialect>();
    registry.insert<mlir::DLTIDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// CUFLaunchAttachAttr
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CUFLAUNCHATTACHATTR
std::unique_ptr<::mlir::Pass> createCUFLaunchAttachAttr();
#undef GEN_PASS_DECL_CUFLAUNCHATTACHATTR
#endif // GEN_PASS_DECL_CUFLAUNCHATTACHATTR
#ifdef GEN_PASS_DEF_CUFLAUNCHATTACHATTR

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Attach CUDA attribute to CUF kernel generated launch)PD"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// CUFOpConversion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CUFOPCONVERSION
struct CUFOpConversionOptions {
  bool allocationConversion = true;
};
std::unique_ptr<::mlir::Pass> createCUFOpConversion();
std::unique_ptr<::mlir::Pass> createCUFOpConversion(CUFOpConversionOptions options);
#undef GEN_PASS_DECL_CUFOPCONVERSION
#endif // GEN_PASS_DECL_CUFOPCONVERSION
#ifdef GEN_PASS_DEF_CUFOPCONVERSION

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert some CUF operations to runtime calls)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::gpu::GPUDialect>();
    registry.insert<mlir::DLTIDialect>();
  }

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

  CUFOpConversionBase(CUFOpConversionOptions options) : CUFOpConversionBase() {
    allocationConversion = std::move(options.allocationConversion);
  }
protected:
  ::mlir::Pass::Option<bool> allocationConversion{*this, "allocation-conversion", ::llvm::cl::desc(R"PO(Convert allocation related operation with this pass)PO"), ::llvm::cl::init(true)};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createCUFOpConversion(CUFOpConversionOptions options) {
  return impl::createCUFOpConversion(std::move(options));
}
#undef GEN_PASS_DEF_CUFOPCONVERSION
#endif // GEN_PASS_DEF_CUFOPCONVERSION

//===----------------------------------------------------------------------===//
// CUFPredefinedVarToGPU
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CUFPREDEFINEDVARTOGPU
std::unique_ptr<::mlir::Pass> createCUFPredefinedVarToGPU();
#undef GEN_PASS_DECL_CUFPREDEFINEDVARTOGPU
#endif // GEN_PASS_DECL_CUFPREDEFINEDVARTOGPU
#ifdef GEN_PASS_DEF_CUFPREDEFINEDVARTOGPU

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Transform predefined variables to GPU operations)PD"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// CharacterConversion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CHARACTERCONVERSION
struct CharacterConversionOptions {
  std::string useRuntimeCalls = std::string{};
};
std::unique_ptr<::mlir::Pass> createCharacterConversion();
std::unique_ptr<::mlir::Pass> createCharacterConversion(CharacterConversionOptions options);
#undef GEN_PASS_DECL_CHARACTERCONVERSION
#endif // GEN_PASS_DECL_CHARACTERCONVERSION
#ifdef GEN_PASS_DEF_CHARACTERCONVERSION

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert CHARACTER entities with different KINDs)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CharacterConversionBase<DerivedT>)

  CharacterConversionBase(CharacterConversionOptions options) : CharacterConversionBase() {
    useRuntimeCalls = std::move(options.useRuntimeCalls);
  }
protected:
  ::mlir::Pass::Option<std::string> useRuntimeCalls{*this, "use-runtime-calls", ::llvm::cl::desc(R"PO(Generate runtime calls to a named set of conversion routines. By default, the conversions may produce unexpected results.)PO"), ::llvm::cl::init(std::string{})};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createCharacterConversion(CharacterConversionOptions options) {
  return impl::createCharacterConversion(std::move(options));
}
#undef GEN_PASS_DEF_CHARACTERCONVERSION
#endif // GEN_PASS_DEF_CHARACTERCONVERSION

//===----------------------------------------------------------------------===//
// CompilerGeneratedNamesConversion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_COMPILERGENERATEDNAMESCONVERSION
std::unique_ptr<::mlir::Pass> createCompilerGeneratedNamesConversion();
#undef GEN_PASS_DECL_COMPILERGENERATEDNAMESCONVERSION
#endif // GEN_PASS_DECL_COMPILERGENERATEDNAMESCONVERSION
#ifdef GEN_PASS_DEF_COMPILERGENERATEDNAMESCONVERSION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert names of compiler generated globals)PD"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// ConstantArgumentGlobalisationOpt
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CONSTANTARGUMENTGLOBALISATIONOPT
std::unique_ptr<::mlir::Pass> createConstantArgumentGlobalisationOpt();
#undef GEN_PASS_DECL_CONSTANTARGUMENTGLOBALISATIONOPT
#endif // GEN_PASS_DECL_CONSTANTARGUMENTGLOBALISATIONOPT
#ifdef GEN_PASS_DEF_CONSTANTARGUMENTGLOBALISATIONOPT

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert constant function arguments to global constants.)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConstantArgumentGlobalisationOptBase<DerivedT>)

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// ConvertComplexPow
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CONVERTCOMPLEXPOW
std::unique_ptr<::mlir::Pass> createConvertComplexPow();
#undef GEN_PASS_DECL_CONVERTCOMPLEXPOW
#endif // GEN_PASS_DECL_CONVERTCOMPLEXPOW
#ifdef GEN_PASS_DEF_CONVERTCOMPLEXPOW

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert complex.pow operations to library calls)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::func::FuncDialect>();
    registry.insert<mlir::complex::ComplexDialect>();
    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(ConvertComplexPowBase<DerivedT>)

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// ExternalNameConversion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_EXTERNALNAMECONVERSION
struct ExternalNameConversionOptions {
  bool appendUnderscoreOpt = true;
};
std::unique_ptr<::mlir::Pass> createExternalNameConversion();
std::unique_ptr<::mlir::Pass> createExternalNameConversion(ExternalNameConversionOptions options);
#undef GEN_PASS_DECL_EXTERNALNAMECONVERSION
#endif // GEN_PASS_DECL_EXTERNALNAMECONVERSION
#ifdef GEN_PASS_DEF_EXTERNALNAMECONVERSION

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert name for external interoperability)PD"; }

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

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

  ExternalNameConversionBase(ExternalNameConversionOptions options) : ExternalNameConversionBase() {
    appendUnderscoreOpt = std::move(options.appendUnderscoreOpt);
  }
protected:
  ::mlir::Pass::Option<bool> appendUnderscoreOpt{*this, "append-underscore", ::llvm::cl::desc(R"PO(Append trailing underscore to external names.)PO"), ::llvm::cl::init(true)};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createExternalNameConversion(ExternalNameConversionOptions options) {
  return impl::createExternalNameConversion(std::move(options));
}
#undef GEN_PASS_DEF_EXTERNALNAMECONVERSION
#endif // GEN_PASS_DEF_EXTERNALNAMECONVERSION

//===----------------------------------------------------------------------===//
// FIRToSCFPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_FIRTOSCFPASS
struct FIRToSCFPassOptions {
  bool parallelUnordered = false;
};
std::unique_ptr<::mlir::Pass> createFIRToSCFPass();
std::unique_ptr<::mlir::Pass> createFIRToSCFPass(FIRToSCFPassOptions options);
#undef GEN_PASS_DECL_FIRTOSCFPASS
#endif // GEN_PASS_DECL_FIRTOSCFPASS
#ifdef GEN_PASS_DEF_FIRTOSCFPASS

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert FIR structured control flow ops to SCF dialect.)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<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(FIRToSCFPassBase<DerivedT>)

  FIRToSCFPassBase(FIRToSCFPassOptions options) : FIRToSCFPassBase() {
    parallelUnordered = std::move(options.parallelUnordered);
  }
protected:
  ::mlir::Pass::Option<bool> parallelUnordered{*this, "parallel-unordered", ::llvm::cl::desc(R"PO(Allow converting a fir.do_loop with the `unordered` attribute to scf.parallel (experimental).)PO"), ::llvm::cl::init(false)};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createFIRToSCFPass(FIRToSCFPassOptions options) {
  return impl::createFIRToSCFPass(std::move(options));
}
#undef GEN_PASS_DEF_FIRTOSCFPASS
#endif // GEN_PASS_DEF_FIRTOSCFPASS

//===----------------------------------------------------------------------===//
// FunctionAttr
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_FUNCTIONATTR
struct FunctionAttrOptions {
  mlir::LLVM::framePointerKind::FramePointerKind framePointerKind = mlir::LLVM::framePointerKind::FramePointerKind{};
  std::string instrumentFunctionEntry;
  std::string instrumentFunctionExit;
  bool noInfsFPMath = false;
  bool noNaNsFPMath = false;
  bool approxFuncFPMath = false;
  bool noSignedZerosFPMath = false;
  bool unsafeFPMath = false;
  std::string reciprocals;
  std::string preferVectorWidth;
  std::string tuneCPU;
  bool setNoCapture = false;
  bool setNoAlias = false;
};
std::unique_ptr<::mlir::Pass> createFunctionAttr();
std::unique_ptr<::mlir::Pass> createFunctionAttr(FunctionAttrOptions options);
#undef GEN_PASS_DECL_FUNCTIONATTR
#endif // GEN_PASS_DECL_FUNCTIONATTR
#ifdef GEN_PASS_DEF_FUNCTIONATTR

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Pass that adds function attributes expected at LLVM IR level)PD"; }

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

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

  FunctionAttrBase(FunctionAttrOptions options) : FunctionAttrBase() {
    framePointerKind = std::move(options.framePointerKind);
    instrumentFunctionEntry = std::move(options.instrumentFunctionEntry);
    instrumentFunctionExit = std::move(options.instrumentFunctionExit);
    noInfsFPMath = std::move(options.noInfsFPMath);
    noNaNsFPMath = std::move(options.noNaNsFPMath);
    approxFuncFPMath = std::move(options.approxFuncFPMath);
    noSignedZerosFPMath = std::move(options.noSignedZerosFPMath);
    unsafeFPMath = std::move(options.unsafeFPMath);
    reciprocals = std::move(options.reciprocals);
    preferVectorWidth = std::move(options.preferVectorWidth);
    tuneCPU = std::move(options.tuneCPU);
    setNoCapture = std::move(options.setNoCapture);
    setNoAlias = std::move(options.setNoAlias);
  }
protected:
  ::mlir::Pass::Option<mlir::LLVM::framePointerKind::FramePointerKind> framePointerKind{*this, "frame-pointer", ::llvm::cl::desc(R"PO(frame pointer)PO"), ::llvm::cl::init(mlir::LLVM::framePointerKind::FramePointerKind{}), ::llvm::cl::values(
            clEnumValN(mlir::LLVM::framePointerKind::FramePointerKind::None, "None", ""),
            clEnumValN(mlir::LLVM::framePointerKind::FramePointerKind::NonLeaf, "NonLeaf", ""),
            clEnumValN(mlir::LLVM::framePointerKind::FramePointerKind::All, "All", ""),
            clEnumValN(mlir::LLVM::framePointerKind::FramePointerKind::Reserved, "Reserved", ""),
            clEnumValN(mlir::LLVM::framePointerKind::FramePointerKind::NonLeafNoReserve, "NonLeafNoReserve", "")
          )};
  ::mlir::Pass::Option<std::string> instrumentFunctionEntry{*this, "instrument-function-entry", ::llvm::cl::desc(R"PO(Sets the name of the profiling function called during function entry)PO")};
  ::mlir::Pass::Option<std::string> instrumentFunctionExit{*this, "instrument-function-exit", ::llvm::cl::desc(R"PO(Sets the name of the profiling function called during function exit)PO")};
  ::mlir::Pass::Option<bool> noInfsFPMath{*this, "no-infs-fp-math", ::llvm::cl::desc(R"PO(Set the no-infs-fp-math attribute on functions in the module.)PO"), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> noNaNsFPMath{*this, "no-nans-fp-math", ::llvm::cl::desc(R"PO(Set the no-nans-fp-math attribute on functions in the module.)PO"), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> approxFuncFPMath{*this, "approx-func-fp-math", ::llvm::cl::desc(R"PO(Set the afn flag on instructions in the module.)PO"), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> noSignedZerosFPMath{*this, "no-signed-zeros-fp-math", ::llvm::cl::desc(R"PO(Set the no-signed-zeros-fp-math attribute on functions in the module.)PO"), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> unsafeFPMath{*this, "unsafe-fp-math", ::llvm::cl::desc(R"PO(Set all fast-math flags on instructions in the module.)PO"), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<std::string> reciprocals{*this, "mrecip", ::llvm::cl::desc(R"PO(Set the reciprocal-estimates attribute on functions in the module.)PO")};
  ::mlir::Pass::Option<std::string> preferVectorWidth{*this, "prefer-vector-width", ::llvm::cl::desc(R"PO(Set the prefer-vector-width attribute on functions in the module.)PO")};
  ::mlir::Pass::Option<std::string> tuneCPU{*this, "tune-cpu", ::llvm::cl::desc(R"PO(Set the tune-cpu attribute on functions in the module.)PO")};
  ::mlir::Pass::Option<bool> setNoCapture{*this, "set-nocapture", ::llvm::cl::desc(R"PO(Set LLVM nocapture attribute on function arguments, if possible)PO"), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> setNoAlias{*this, "set-noalias", ::llvm::cl::desc(R"PO(Set LLVM noalias attribute on function arguments, if possible)PO"), ::llvm::cl::init(false)};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createFunctionAttr(FunctionAttrOptions options) {
  return impl::createFunctionAttr(std::move(options));
}
#undef GEN_PASS_DEF_FUNCTIONATTR
#endif // GEN_PASS_DEF_FUNCTIONATTR

//===----------------------------------------------------------------------===//
// GenRuntimeCallsForTest
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_GENRUNTIMECALLSFORTEST
struct GenRuntimeCallsForTestOptions {
  bool doGenerateCalls = false;
};
std::unique_ptr<::mlir::Pass> createGenRuntimeCallsForTest();
std::unique_ptr<::mlir::Pass> createGenRuntimeCallsForTest(GenRuntimeCallsForTestOptions options);
#undef GEN_PASS_DECL_GENRUNTIMECALLSFORTEST
#endif // GEN_PASS_DECL_GENRUNTIMECALLSFORTEST
#ifdef GEN_PASS_DEF_GENRUNTIMECALLSFORTEST

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Print FIR containing declarations/calls of Fortran runtime functions)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::func::FuncDialect>();
  }

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

  GenRuntimeCallsForTestBase(GenRuntimeCallsForTestOptions options) : GenRuntimeCallsForTestBase() {
    doGenerateCalls = std::move(options.doGenerateCalls);
  }
protected:
  ::mlir::Pass::Option<bool> doGenerateCalls{*this, "do-generate-calls", ::llvm::cl::desc(R"PO(Generate thin wrapper functions that call Fortran runtime functions. If it is set to false, then only the declarations are generated.)PO"), ::llvm::cl::init(false)};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createGenRuntimeCallsForTest(GenRuntimeCallsForTestOptions options) {
  return impl::createGenRuntimeCallsForTest(std::move(options));
}
#undef GEN_PASS_DEF_GENRUNTIMECALLSFORTEST
#endif // GEN_PASS_DEF_GENRUNTIMECALLSFORTEST

//===----------------------------------------------------------------------===//
// LoopInvariantCodeMotion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LOOPINVARIANTCODEMOTION
std::unique_ptr<::mlir::Pass> createLoopInvariantCodeMotion();
#undef GEN_PASS_DECL_LOOPINVARIANTCODEMOTION
#endif // GEN_PASS_DECL_LOOPINVARIANTCODEMOTION
#ifdef GEN_PASS_DEF_LOOPINVARIANTCODEMOTION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Hoist invariants from loops)PD"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// LoopVersioning
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LOOPVERSIONING
std::unique_ptr<::mlir::Pass> createLoopVersioning();
#undef GEN_PASS_DECL_LOOPVERSIONING
#endif // GEN_PASS_DECL_LOOPVERSIONING
#ifdef GEN_PASS_DEF_LOOPVERSIONING

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Loop Versioning)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::DLTIDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// MIFOpConversion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MIFOPCONVERSION
std::unique_ptr<::mlir::Pass> createMIFOpConversion();
#undef GEN_PASS_DECL_MIFOPCONVERSION
#endif // GEN_PASS_DECL_MIFOPCONVERSION
#ifdef GEN_PASS_DEF_MIFOPCONVERSION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert some MIF operations to runtime calls)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::LLVM::LLVMDialect>();
    registry.insert<mlir::cf::ControlFlowDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// MemRefDataFlowOpt
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MEMREFDATAFLOWOPT
#undef GEN_PASS_DECL_MEMREFDATAFLOWOPT
#endif // GEN_PASS_DECL_MEMREFDATAFLOWOPT
#ifdef GEN_PASS_DEF_MEMREFDATAFLOWOPT
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Perform store/load forwarding and potentially removing dead stores.)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::func::FuncDialect>();
  }

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

protected:
private:
};
} // namespace impl
#undef GEN_PASS_DEF_MEMREFDATAFLOWOPT
#endif // GEN_PASS_DEF_MEMREFDATAFLOWOPT

//===----------------------------------------------------------------------===//
// MemoryAllocationOpt
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MEMORYALLOCATIONOPT
struct MemoryAllocationOptOptions {
  bool dynamicArrayOnHeap = false;
  std::size_t maxStackArraySize = ~static_cast<std::size_t>(0);
};
std::unique_ptr<::mlir::Pass> createMemoryAllocationOpt();
std::unique_ptr<::mlir::Pass> createMemoryAllocationOpt(MemoryAllocationOptOptions options);
#undef GEN_PASS_DECL_MEMORYALLOCATIONOPT
#endif // GEN_PASS_DECL_MEMORYALLOCATIONOPT
#ifdef GEN_PASS_DEF_MEMORYALLOCATIONOPT

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Convert stack to heap allocations and vice versa.)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(MemoryAllocationOptBase<DerivedT>)

  MemoryAllocationOptBase(MemoryAllocationOptOptions options) : MemoryAllocationOptBase() {
    dynamicArrayOnHeap = std::move(options.dynamicArrayOnHeap);
    maxStackArraySize = std::move(options.maxStackArraySize);
  }
protected:
  ::mlir::Pass::Option<bool> dynamicArrayOnHeap{*this, "dynamic-array-on-heap", ::llvm::cl::desc(R"PO(Allocate all arrays with runtime determined size on heap.)PO"), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<std::size_t> maxStackArraySize{*this, "maximum-array-alloc-size", ::llvm::cl::desc(R"PO(Set maximum number of elements of an array allocated on the stack.)PO"), ::llvm::cl::init(~static_cast<std::size_t>(0))};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createMemoryAllocationOpt(MemoryAllocationOptOptions options) {
  return impl::createMemoryAllocationOpt(std::move(options));
}
#undef GEN_PASS_DEF_MEMORYALLOCATIONOPT
#endif // GEN_PASS_DEF_MEMORYALLOCATIONOPT

//===----------------------------------------------------------------------===//
// OptimizeArrayRepacking
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_OPTIMIZEARRAYREPACKING
std::unique_ptr<::mlir::Pass> createOptimizeArrayRepacking();
#undef GEN_PASS_DECL_OPTIMIZEARRAYREPACKING
#endif // GEN_PASS_DECL_OPTIMIZEARRAYREPACKING
#ifdef GEN_PASS_DEF_OPTIMIZEARRAYREPACKING

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Optimizes redundant array repacking operations)PD"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// PolymorphicOpConversion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_POLYMORPHICOPCONVERSION
std::unique_ptr<::mlir::Pass> createPolymorphicOpConversion();
#undef GEN_PASS_DECL_POLYMORPHICOPCONVERSION
#endif // GEN_PASS_DECL_POLYMORPHICOPCONVERSION
#ifdef GEN_PASS_DEF_POLYMORPHICOPCONVERSION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Simplify operations on polymorphic types)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::func::FuncDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// SetRuntimeCallAttributes
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SETRUNTIMECALLATTRIBUTES
std::unique_ptr<::mlir::Pass> createSetRuntimeCallAttributes();
#undef GEN_PASS_DECL_SETRUNTIMECALLATTRIBUTES
#endif // GEN_PASS_DECL_SETRUNTIMECALLATTRIBUTES
#ifdef GEN_PASS_DEF_SETRUNTIMECALLATTRIBUTES

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Set Fortran runtime fir.call attributes targeting LLVM IR)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::LLVM::LLVMDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SetRuntimeCallAttributesBase<DerivedT>)

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// SimplifyFIROperations
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SIMPLIFYFIROPERATIONS
struct SimplifyFIROperationsOptions {
  bool preferInlineImplementation = false;
};
std::unique_ptr<::mlir::Pass> createSimplifyFIROperations();
std::unique_ptr<::mlir::Pass> createSimplifyFIROperations(SimplifyFIROperationsOptions options);
#undef GEN_PASS_DECL_SIMPLIFYFIROPERATIONS
#endif // GEN_PASS_DECL_SIMPLIFYFIROPERATIONS
#ifdef GEN_PASS_DEF_SIMPLIFYFIROPERATIONS

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Simplifies complex FIR operations)PD"; }

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

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

  SimplifyFIROperationsBase(SimplifyFIROperationsOptions options) : SimplifyFIROperationsBase() {
    preferInlineImplementation = std::move(options.preferInlineImplementation);
  }
protected:
  ::mlir::Pass::Option<bool> preferInlineImplementation{*this, "prefer-inline-implementation", ::llvm::cl::desc(R"PO(Prefer expanding without using Fortran runtime calls.)PO"), ::llvm::cl::init(false)};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createSimplifyFIROperations(SimplifyFIROperationsOptions options) {
  return impl::createSimplifyFIROperations(std::move(options));
}
#undef GEN_PASS_DEF_SIMPLIFYFIROPERATIONS
#endif // GEN_PASS_DEF_SIMPLIFYFIROPERATIONS

//===----------------------------------------------------------------------===//
// SimplifyIntrinsics
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SIMPLIFYINTRINSICS
struct SimplifyIntrinsicsOptions {
  bool enableExperimental = false;
};
std::unique_ptr<::mlir::Pass> createSimplifyIntrinsics();
std::unique_ptr<::mlir::Pass> createSimplifyIntrinsics(SimplifyIntrinsicsOptions options);
#undef GEN_PASS_DECL_SIMPLIFYINTRINSICS
#endif // GEN_PASS_DECL_SIMPLIFYINTRINSICS
#ifdef GEN_PASS_DEF_SIMPLIFYINTRINSICS

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Intrinsics simplification)PD"; }

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

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

  SimplifyIntrinsicsBase(SimplifyIntrinsicsOptions options) : SimplifyIntrinsicsBase() {
    enableExperimental = std::move(options.enableExperimental);
  }
protected:
  ::mlir::Pass::Option<bool> enableExperimental{*this, "enable-experimental", ::llvm::cl::desc(R"PO(Enable experimental code that may not always work correctly)PO"), ::llvm::cl::init(false)};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createSimplifyIntrinsics(SimplifyIntrinsicsOptions options) {
  return impl::createSimplifyIntrinsics(std::move(options));
}
#undef GEN_PASS_DEF_SIMPLIFYINTRINSICS
#endif // GEN_PASS_DEF_SIMPLIFYINTRINSICS

//===----------------------------------------------------------------------===//
// SimplifyRegionLite
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SIMPLIFYREGIONLITE
std::unique_ptr<::mlir::Pass> createSimplifyRegionLite();
#undef GEN_PASS_DECL_SIMPLIFYREGIONLITE
#endif // GEN_PASS_DECL_SIMPLIFYREGIONLITE
#ifdef GEN_PASS_DEF_SIMPLIFYREGIONLITE

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Region simplification)PD"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// StackArrays
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_STACKARRAYS
std::unique_ptr<::mlir::Pass> createStackArrays();
#undef GEN_PASS_DECL_STACKARRAYS
#endif // GEN_PASS_DECL_STACKARRAYS
#ifdef GEN_PASS_DEF_STACKARRAYS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Move local array allocations from heap memory into stack memory)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<fir::FIROpsDialect>();
    registry.insert<mlir::DLTIDialect>();
    registry.insert<mlir::LLVM::LLVMDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(StackArraysBase<DerivedT>)

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// StackReclaim
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_STACKRECLAIM
std::unique_ptr<::mlir::Pass> createStackReclaim();
#undef GEN_PASS_DECL_STACKRECLAIM
#endif // GEN_PASS_DECL_STACKRECLAIM
#ifdef GEN_PASS_DEF_STACKRECLAIM

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Insert stacksave/stackrestore in region with allocas)PD"; }

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

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<mlir::LLVM::LLVMDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(StackReclaimBase<DerivedT>)

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// VScaleAttr
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_VSCALEATTR
struct VScaleAttrOptions {
  std::pair<unsigned, unsigned> vscaleRange = std::pair<unsigned, unsigned>{};
};
std::unique_ptr<::mlir::Pass> createVScaleAttr();
std::unique_ptr<::mlir::Pass> createVScaleAttr(VScaleAttrOptions options);
#undef GEN_PASS_DECL_VSCALEATTR
#endif // GEN_PASS_DECL_VSCALEATTR
#ifdef GEN_PASS_DEF_VSCALEATTR

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Add vscale_range attribute to functions)PD"; }

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

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

  VScaleAttrBase(VScaleAttrOptions options) : VScaleAttrBase() {
    vscaleRange = std::move(options.vscaleRange);
  }
protected:
  ::mlir::Pass::Option<std::pair<unsigned, unsigned>> vscaleRange{*this, "vscale-range", ::llvm::cl::desc(R"PO(vector scale range)PO"), ::llvm::cl::init(std::pair<unsigned, unsigned>{})};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createVScaleAttr(VScaleAttrOptions options) {
  return impl::createVScaleAttr(std::move(options));
}
#undef GEN_PASS_DEF_VSCALEATTR
#endif // GEN_PASS_DEF_VSCALEATTR
#ifdef GEN_PASS_REGISTRATION
// Generate registrations for all passes.
#define GEN_PASS_REGISTRATION_ABSTRACTRESULTOPT
#define GEN_PASS_REGISTRATION_ADDALIASTAGS
#define GEN_PASS_REGISTRATION_ADDDEBUGINFO
#define GEN_PASS_REGISTRATION_AFFINEDIALECTDEMOTION
#define GEN_PASS_REGISTRATION_AFFINEDIALECTPROMOTION
#define GEN_PASS_REGISTRATION_ALGEBRAICSIMPLIFICATION
#define GEN_PASS_REGISTRATION_ANNOTATECONSTANTOPERANDS
#define GEN_PASS_REGISTRATION_ARRAYVALUECOPY
#define GEN_PASS_REGISTRATION_ASSUMEDRANKOPCONVERSION
#define GEN_PASS_REGISTRATION_CFGCONVERSION
#define GEN_PASS_REGISTRATION_CUFADDCONSTRUCTOR
#define GEN_PASS_REGISTRATION_CUFALLOCATIONCONVERSION
#define GEN_PASS_REGISTRATION_CUFCOMPUTESHAREDMEMORYOFFSETSANDSIZE
#define GEN_PASS_REGISTRATION_CUFDEVICEFUNCTRANSFORM
#define GEN_PASS_REGISTRATION_CUFDEVICEGLOBAL
#define GEN_PASS_REGISTRATION_CUFFUNCTIONREWRITE
#define GEN_PASS_REGISTRATION_CUFGPUTOLLVMCONVERSION
#define GEN_PASS_REGISTRATION_CUFLAUNCHATTACHATTR
#define GEN_PASS_REGISTRATION_CUFOPCONVERSION
#define GEN_PASS_REGISTRATION_CUFPREDEFINEDVARTOGPU
#define GEN_PASS_REGISTRATION_CHARACTERCONVERSION
#define GEN_PASS_REGISTRATION_COMPILERGENERATEDNAMESCONVERSION
#define GEN_PASS_REGISTRATION_CONSTANTARGUMENTGLOBALISATIONOPT
#define GEN_PASS_REGISTRATION_CONVERTCOMPLEXPOW
#define GEN_PASS_REGISTRATION_EXTERNALNAMECONVERSION
#define GEN_PASS_REGISTRATION_FIRTOSCFPASS
#define GEN_PASS_REGISTRATION_FUNCTIONATTR
#define GEN_PASS_REGISTRATION_GENRUNTIMECALLSFORTEST
#define GEN_PASS_REGISTRATION_LOOPINVARIANTCODEMOTION
#define GEN_PASS_REGISTRATION_LOOPVERSIONING
#define GEN_PASS_REGISTRATION_MIFOPCONVERSION
#define GEN_PASS_REGISTRATION_MEMREFDATAFLOWOPT
#define GEN_PASS_REGISTRATION_MEMORYALLOCATIONOPT
#define GEN_PASS_REGISTRATION_OPTIMIZEARRAYREPACKING
#define GEN_PASS_REGISTRATION_POLYMORPHICOPCONVERSION
#define GEN_PASS_REGISTRATION_SETRUNTIMECALLATTRIBUTES
#define GEN_PASS_REGISTRATION_SIMPLIFYFIROPERATIONS
#define GEN_PASS_REGISTRATION_SIMPLIFYINTRINSICS
#define GEN_PASS_REGISTRATION_SIMPLIFYREGIONLITE
#define GEN_PASS_REGISTRATION_STACKARRAYS
#define GEN_PASS_REGISTRATION_STACKRECLAIM
#define GEN_PASS_REGISTRATION_VSCALEATTR
#endif // GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// AbstractResultOpt Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ABSTRACTRESULTOPT

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

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

#undef GEN_PASS_REGISTRATION_ABSTRACTRESULTOPT
#endif // GEN_PASS_REGISTRATION_ABSTRACTRESULTOPT

//===----------------------------------------------------------------------===//
// AddAliasTags Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ADDALIASTAGS

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

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

#undef GEN_PASS_REGISTRATION_ADDALIASTAGS
#endif // GEN_PASS_REGISTRATION_ADDALIASTAGS

//===----------------------------------------------------------------------===//
// AddDebugInfo Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ADDDEBUGINFO

inline void registerAddDebugInfo() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return ::fir::createAddDebugInfoPass();
  });
}

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

#undef GEN_PASS_REGISTRATION_ADDDEBUGINFO
#endif // GEN_PASS_REGISTRATION_ADDDEBUGINFO

//===----------------------------------------------------------------------===//
// AffineDialectDemotion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_AFFINEDIALECTDEMOTION

inline void registerAffineDialectDemotion() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return ::fir::createAffineDemotionPass();
  });
}

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

#undef GEN_PASS_REGISTRATION_AFFINEDIALECTDEMOTION
#endif // GEN_PASS_REGISTRATION_AFFINEDIALECTDEMOTION

//===----------------------------------------------------------------------===//
// AffineDialectPromotion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_AFFINEDIALECTPROMOTION

inline void registerAffineDialectPromotion() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return ::fir::createPromoteToAffinePass();
  });
}

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

#undef GEN_PASS_REGISTRATION_AFFINEDIALECTPROMOTION
#endif // GEN_PASS_REGISTRATION_AFFINEDIALECTPROMOTION

//===----------------------------------------------------------------------===//
// AlgebraicSimplification Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ALGEBRAICSIMPLIFICATION

inline void registerAlgebraicSimplification() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return ::fir::createAlgebraicSimplificationPass();
  });
}

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

#undef GEN_PASS_REGISTRATION_ALGEBRAICSIMPLIFICATION
#endif // GEN_PASS_REGISTRATION_ALGEBRAICSIMPLIFICATION

//===----------------------------------------------------------------------===//
// AnnotateConstantOperands Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ANNOTATECONSTANTOPERANDS

inline void registerAnnotateConstantOperands() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return ::fir::createAnnotateConstantOperandsPass();
  });
}

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

#undef GEN_PASS_REGISTRATION_ANNOTATECONSTANTOPERANDS
#endif // GEN_PASS_REGISTRATION_ANNOTATECONSTANTOPERANDS

//===----------------------------------------------------------------------===//
// ArrayValueCopy Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ARRAYVALUECOPY

inline void registerArrayValueCopy() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return ::fir::createArrayValueCopyPass();
  });
}

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

#undef GEN_PASS_REGISTRATION_ARRAYVALUECOPY
#endif // GEN_PASS_REGISTRATION_ARRAYVALUECOPY

//===----------------------------------------------------------------------===//
// AssumedRankOpConversion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_ASSUMEDRANKOPCONVERSION

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

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

#undef GEN_PASS_REGISTRATION_ASSUMEDRANKOPCONVERSION
#endif // GEN_PASS_REGISTRATION_ASSUMEDRANKOPCONVERSION

//===----------------------------------------------------------------------===//
// CFGConversion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CFGCONVERSION

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

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

#undef GEN_PASS_REGISTRATION_CFGCONVERSION
#endif // GEN_PASS_REGISTRATION_CFGCONVERSION

//===----------------------------------------------------------------------===//
// CUFAddConstructor Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CUFADDCONSTRUCTOR

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

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

#undef GEN_PASS_REGISTRATION_CUFADDCONSTRUCTOR
#endif // GEN_PASS_REGISTRATION_CUFADDCONSTRUCTOR

//===----------------------------------------------------------------------===//
// CUFAllocationConversion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CUFALLOCATIONCONVERSION

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

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

#undef GEN_PASS_REGISTRATION_CUFALLOCATIONCONVERSION
#endif // GEN_PASS_REGISTRATION_CUFALLOCATIONCONVERSION

//===----------------------------------------------------------------------===//
// CUFComputeSharedMemoryOffsetsAndSize Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CUFCOMPUTESHAREDMEMORYOFFSETSANDSIZE

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

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

#undef GEN_PASS_REGISTRATION_CUFCOMPUTESHAREDMEMORYOFFSETSANDSIZE
#endif // GEN_PASS_REGISTRATION_CUFCOMPUTESHAREDMEMORYOFFSETSANDSIZE

//===----------------------------------------------------------------------===//
// CUFDeviceFuncTransform Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CUFDEVICEFUNCTRANSFORM

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

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

#undef GEN_PASS_REGISTRATION_CUFDEVICEFUNCTRANSFORM
#endif // GEN_PASS_REGISTRATION_CUFDEVICEFUNCTRANSFORM

//===----------------------------------------------------------------------===//
// CUFDeviceGlobal Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CUFDEVICEGLOBAL

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

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

#undef GEN_PASS_REGISTRATION_CUFDEVICEGLOBAL
#endif // GEN_PASS_REGISTRATION_CUFDEVICEGLOBAL

//===----------------------------------------------------------------------===//
// CUFFunctionRewrite Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CUFFUNCTIONREWRITE

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

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

#undef GEN_PASS_REGISTRATION_CUFFUNCTIONREWRITE
#endif // GEN_PASS_REGISTRATION_CUFFUNCTIONREWRITE

//===----------------------------------------------------------------------===//
// CUFGPUToLLVMConversion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CUFGPUTOLLVMCONVERSION

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

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

#undef GEN_PASS_REGISTRATION_CUFGPUTOLLVMCONVERSION
#endif // GEN_PASS_REGISTRATION_CUFGPUTOLLVMCONVERSION

//===----------------------------------------------------------------------===//
// CUFLaunchAttachAttr Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CUFLAUNCHATTACHATTR

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

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

#undef GEN_PASS_REGISTRATION_CUFLAUNCHATTACHATTR
#endif // GEN_PASS_REGISTRATION_CUFLAUNCHATTACHATTR

//===----------------------------------------------------------------------===//
// CUFOpConversion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CUFOPCONVERSION

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

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

#undef GEN_PASS_REGISTRATION_CUFOPCONVERSION
#endif // GEN_PASS_REGISTRATION_CUFOPCONVERSION

//===----------------------------------------------------------------------===//
// CUFPredefinedVarToGPU Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CUFPREDEFINEDVARTOGPU

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

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

#undef GEN_PASS_REGISTRATION_CUFPREDEFINEDVARTOGPU
#endif // GEN_PASS_REGISTRATION_CUFPREDEFINEDVARTOGPU

//===----------------------------------------------------------------------===//
// CharacterConversion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CHARACTERCONVERSION

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

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

#undef GEN_PASS_REGISTRATION_CHARACTERCONVERSION
#endif // GEN_PASS_REGISTRATION_CHARACTERCONVERSION

//===----------------------------------------------------------------------===//
// CompilerGeneratedNamesConversion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_COMPILERGENERATEDNAMESCONVERSION

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

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

#undef GEN_PASS_REGISTRATION_COMPILERGENERATEDNAMESCONVERSION
#endif // GEN_PASS_REGISTRATION_COMPILERGENERATEDNAMESCONVERSION

//===----------------------------------------------------------------------===//
// ConstantArgumentGlobalisationOpt Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CONSTANTARGUMENTGLOBALISATIONOPT

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

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

#undef GEN_PASS_REGISTRATION_CONSTANTARGUMENTGLOBALISATIONOPT
#endif // GEN_PASS_REGISTRATION_CONSTANTARGUMENTGLOBALISATIONOPT

//===----------------------------------------------------------------------===//
// ConvertComplexPow Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CONVERTCOMPLEXPOW

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

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

#undef GEN_PASS_REGISTRATION_CONVERTCOMPLEXPOW
#endif // GEN_PASS_REGISTRATION_CONVERTCOMPLEXPOW

//===----------------------------------------------------------------------===//
// ExternalNameConversion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_EXTERNALNAMECONVERSION

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

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

#undef GEN_PASS_REGISTRATION_EXTERNALNAMECONVERSION
#endif // GEN_PASS_REGISTRATION_EXTERNALNAMECONVERSION

//===----------------------------------------------------------------------===//
// FIRToSCFPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_FIRTOSCFPASS

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

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

#undef GEN_PASS_REGISTRATION_FIRTOSCFPASS
#endif // GEN_PASS_REGISTRATION_FIRTOSCFPASS

//===----------------------------------------------------------------------===//
// FunctionAttr Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_FUNCTIONATTR

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

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

#undef GEN_PASS_REGISTRATION_FUNCTIONATTR
#endif // GEN_PASS_REGISTRATION_FUNCTIONATTR

//===----------------------------------------------------------------------===//
// GenRuntimeCallsForTest Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_GENRUNTIMECALLSFORTEST

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

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

#undef GEN_PASS_REGISTRATION_GENRUNTIMECALLSFORTEST
#endif // GEN_PASS_REGISTRATION_GENRUNTIMECALLSFORTEST

//===----------------------------------------------------------------------===//
// LoopInvariantCodeMotion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_LOOPINVARIANTCODEMOTION

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

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

#undef GEN_PASS_REGISTRATION_LOOPINVARIANTCODEMOTION
#endif // GEN_PASS_REGISTRATION_LOOPINVARIANTCODEMOTION

//===----------------------------------------------------------------------===//
// LoopVersioning Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_LOOPVERSIONING

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

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

#undef GEN_PASS_REGISTRATION_LOOPVERSIONING
#endif // GEN_PASS_REGISTRATION_LOOPVERSIONING

//===----------------------------------------------------------------------===//
// MIFOpConversion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_MIFOPCONVERSION

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

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

#undef GEN_PASS_REGISTRATION_MIFOPCONVERSION
#endif // GEN_PASS_REGISTRATION_MIFOPCONVERSION

//===----------------------------------------------------------------------===//
// MemRefDataFlowOpt Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_MEMREFDATAFLOWOPT

inline void registerMemRefDataFlowOpt() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return ::fir::createMemDataFlowOptPass();
  });
}

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

#undef GEN_PASS_REGISTRATION_MEMREFDATAFLOWOPT
#endif // GEN_PASS_REGISTRATION_MEMREFDATAFLOWOPT

//===----------------------------------------------------------------------===//
// MemoryAllocationOpt Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_MEMORYALLOCATIONOPT

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

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

#undef GEN_PASS_REGISTRATION_MEMORYALLOCATIONOPT
#endif // GEN_PASS_REGISTRATION_MEMORYALLOCATIONOPT

//===----------------------------------------------------------------------===//
// OptimizeArrayRepacking Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_OPTIMIZEARRAYREPACKING

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

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

#undef GEN_PASS_REGISTRATION_OPTIMIZEARRAYREPACKING
#endif // GEN_PASS_REGISTRATION_OPTIMIZEARRAYREPACKING

//===----------------------------------------------------------------------===//
// PolymorphicOpConversion Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_POLYMORPHICOPCONVERSION

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

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

#undef GEN_PASS_REGISTRATION_POLYMORPHICOPCONVERSION
#endif // GEN_PASS_REGISTRATION_POLYMORPHICOPCONVERSION

//===----------------------------------------------------------------------===//
// SetRuntimeCallAttributes Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_SETRUNTIMECALLATTRIBUTES

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

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

#undef GEN_PASS_REGISTRATION_SETRUNTIMECALLATTRIBUTES
#endif // GEN_PASS_REGISTRATION_SETRUNTIMECALLATTRIBUTES

//===----------------------------------------------------------------------===//
// SimplifyFIROperations Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_SIMPLIFYFIROPERATIONS

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

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

#undef GEN_PASS_REGISTRATION_SIMPLIFYFIROPERATIONS
#endif // GEN_PASS_REGISTRATION_SIMPLIFYFIROPERATIONS

//===----------------------------------------------------------------------===//
// SimplifyIntrinsics Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_SIMPLIFYINTRINSICS

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

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

#undef GEN_PASS_REGISTRATION_SIMPLIFYINTRINSICS
#endif // GEN_PASS_REGISTRATION_SIMPLIFYINTRINSICS

//===----------------------------------------------------------------------===//
// SimplifyRegionLite Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_SIMPLIFYREGIONLITE

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

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

#undef GEN_PASS_REGISTRATION_SIMPLIFYREGIONLITE
#endif // GEN_PASS_REGISTRATION_SIMPLIFYREGIONLITE

//===----------------------------------------------------------------------===//
// StackArrays Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_STACKARRAYS

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

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

#undef GEN_PASS_REGISTRATION_STACKARRAYS
#endif // GEN_PASS_REGISTRATION_STACKARRAYS

//===----------------------------------------------------------------------===//
// StackReclaim Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_STACKRECLAIM

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

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

#undef GEN_PASS_REGISTRATION_STACKRECLAIM
#endif // GEN_PASS_REGISTRATION_STACKRECLAIM

//===----------------------------------------------------------------------===//
// VScaleAttr Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_VSCALEATTR

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

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

#undef GEN_PASS_REGISTRATION_VSCALEATTR
#endif // GEN_PASS_REGISTRATION_VSCALEATTR
#ifdef GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// OptTransform Registration
//===----------------------------------------------------------------------===//

inline void registerOptTransformPasses() {
  registerAbstractResultOpt();
  registerAddAliasTags();
  registerAddDebugInfo();
  registerAffineDialectDemotion();
  registerAffineDialectPromotion();
  registerAlgebraicSimplification();
  registerAnnotateConstantOperands();
  registerArrayValueCopy();
  registerAssumedRankOpConversion();
  registerCFGConversion();
  registerCUFAddConstructor();
  registerCUFAllocationConversion();
  registerCUFComputeSharedMemoryOffsetsAndSize();
  registerCUFDeviceFuncTransform();
  registerCUFDeviceGlobal();
  registerCUFFunctionRewrite();
  registerCUFGPUToLLVMConversion();
  registerCUFLaunchAttachAttr();
  registerCUFOpConversion();
  registerCUFPredefinedVarToGPU();
  registerCharacterConversion();
  registerCompilerGeneratedNamesConversion();
  registerConstantArgumentGlobalisationOpt();
  registerConvertComplexPow();
  registerExternalNameConversion();
  registerFIRToSCFPass();
  registerFunctionAttr();
  registerGenRuntimeCallsForTest();
  registerLoopInvariantCodeMotion();
  registerLoopVersioning();
  registerMIFOpConversion();
  registerMemRefDataFlowOpt();
  registerMemoryAllocationOpt();
  registerOptimizeArrayRepacking();
  registerPolymorphicOpConversion();
  registerSetRuntimeCallAttributes();
  registerSimplifyFIROperations();
  registerSimplifyIntrinsics();
  registerSimplifyRegionLite();
  registerStackArrays();
  registerStackReclaim();
  registerVScaleAttr();
}
#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
