/* 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_CUFCOMPUTESHAREDMEMORYOFFSETSANDSIZE
#define GEN_PASS_DECL_CUFDEVICEGLOBAL
#define GEN_PASS_DECL_CUFGPUTOLLVMCONVERSION
#define GEN_PASS_DECL_CUFOPCONVERSION
#define GEN_PASS_DECL_CHARACTERCONVERSION
#define GEN_PASS_DECL_COMPILERGENERATEDNAMESCONVERSION
#define GEN_PASS_DECL_CONSTANTARGUMENTGLOBALISATIONOPT
#define GEN_PASS_DECL_EXTERNALNAMECONVERSION
#define GEN_PASS_DECL_FIRTOSCFPASS
#define GEN_PASS_DECL_FUNCTIONATTR
#define GEN_PASS_DECL_GENRUNTIMECALLSFORTEST
#define GEN_PASS_DECL_LOOPVERSIONING
#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 "Convert fir.array, fir.box and fir.rec function result to function argument"; }

  /// 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("Pass fir.array<T> result as fir.box<fir.array<T>> argument instead of fir.ref<fir.array<T>>."), ::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 "Add tbaa tags to operations that implement FirAliasAnalysisOpInterface"; }

  /// 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{};
};
#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 "Add the debug info"; }

  /// 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);
  }
protected:
  ::mlir::Pass::Option<mlir::LLVM::DIEmissionKind> debugLevel{*this, "debug-level", ::llvm::cl::desc("debug level"), ::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("is optimized."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<std::string> inputFilename{*this, "file-name", ::llvm::cl::desc("name of the input source file"), ::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 "Converts `affine.{load,store}` back to fir operations"; }

  /// 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 "Promotes `fir.{do_loop,if}` to `affine.{for,if}`."; }

  /// 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 ""; }

  /// 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 "Annotate constant operands to all FIR operations"; }

  /// 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 "Convert array value operations to memory operations."; }

  /// 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("do more detailed conflict analysis to reduce the number of temporaries"), ::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 "Simplify operations on assumed-rank types"; }

  /// 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 "Convert FIR structured control flow ops to CFG ops."; }

  /// 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("force the body of a loop to execute at least once"), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> setNSW{*this, "set-nsw", ::llvm::cl::desc("set nsw on loop variable increment"), ::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 "Add constructor to register CUDA Fortran allocators"; }

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

//===----------------------------------------------------------------------===//
// 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 "Create the shared memory global variable and set offsets"; }

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

//===----------------------------------------------------------------------===//
// 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 "Flag globals used in device function with data attribute"; }

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

//===----------------------------------------------------------------------===//
// 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 "Convert some GPU operations lowered from CUF to runtime calls"; }

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

//===----------------------------------------------------------------------===//
// CUFOpConversion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CUFOPCONVERSION
std::unique_ptr<::mlir::Pass> createCUFOpConversion();
#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 {

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 "Convert some CUF operations to runtime calls"; }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// 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 "Convert CHARACTER entities with different KINDs"; }

  /// 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("Generate runtime calls to a named set of conversion routines. By default, the conversions may produce unexpected results."), ::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 "Convert names of compiler generated globals"; }

  /// 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 "Convert constant function arguments to global constants."; }

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

//===----------------------------------------------------------------------===//
// 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 "Convert name for external interoperability"; }

  /// 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("Append trailing underscore to external names."), ::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
#undef GEN_PASS_DECL_FIRTOSCFPASS
#endif // GEN_PASS_DECL_FIRTOSCFPASS
#ifdef GEN_PASS_DEF_FIRTOSCFPASS
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 "Convert FIR structured control flow ops to SCF dialect."; }

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

protected:
private:
};
} // namespace impl
#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 "Pass that adds function attributes expected at LLVM IR level"; }

  /// 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("frame pointer"), ::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", "")
          )};
  ::mlir::Pass::Option<std::string> instrumentFunctionEntry{*this, "instrument-function-entry", ::llvm::cl::desc("Sets the name of the profiling function called during function entry")};
  ::mlir::Pass::Option<std::string> instrumentFunctionExit{*this, "instrument-function-exit", ::llvm::cl::desc("Sets the name of the profiling function called during function exit")};
  ::mlir::Pass::Option<bool> noInfsFPMath{*this, "no-infs-fp-math", ::llvm::cl::desc("Set the no-infs-fp-math attribute on functions in the module."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> noNaNsFPMath{*this, "no-nans-fp-math", ::llvm::cl::desc("Set the no-nans-fp-math attribute on functions in the module."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> approxFuncFPMath{*this, "approx-func-fp-math", ::llvm::cl::desc("Set the afn flag on instructions in the module."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> noSignedZerosFPMath{*this, "no-signed-zeros-fp-math", ::llvm::cl::desc("Set the no-signed-zeros-fp-math attribute on functions in the module."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> unsafeFPMath{*this, "unsafe-fp-math", ::llvm::cl::desc("Set the unsafe-fp-math attribute on functions in the module."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<std::string> reciprocals{*this, "mrecip", ::llvm::cl::desc("Set the reciprocal-estimates attribute on functions in the module.")};
  ::mlir::Pass::Option<std::string> preferVectorWidth{*this, "prefer-vector-width", ::llvm::cl::desc("Set the prefer-vector-width attribute on functions in the module.")};
  ::mlir::Pass::Option<std::string> tuneCPU{*this, "tune-cpu", ::llvm::cl::desc("Set the tune-cpu attribute on functions in the module.")};
  ::mlir::Pass::Option<bool> setNoCapture{*this, "set-nocapture", ::llvm::cl::desc("Set LLVM nocapture attribute on function arguments, if possible"), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> setNoAlias{*this, "set-noalias", ::llvm::cl::desc("Set LLVM noalias attribute on function arguments, if possible"), ::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 "Print FIR containing declarations/calls of Fortran runtime functions"; }

  /// 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("Generate thin wrapper functions that call Fortran runtime functions. If it is set to false, then only the declarations are generated."), ::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

//===----------------------------------------------------------------------===//
// 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 "Loop Versioning"; }

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

//===----------------------------------------------------------------------===//
// 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 "Perform store/load forwarding and potentially removing dead stores."; }

  /// 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 "Convert stack to heap allocations and vice versa."; }

  /// 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("Allocate all arrays with runtime determined size on heap."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<std::size_t> maxStackArraySize{*this, "maximum-array-alloc-size", ::llvm::cl::desc("Set maximum number of elements of an array allocated on the stack."), ::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 "Optimizes redundant array repacking operations"; }

  /// 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 "Simplify operations on polymorphic types"; }

  /// 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 "Set Fortran runtime fir.call attributes targeting LLVM IR"; }

  /// 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 "Simplifies complex FIR operations"; }

  /// 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("Prefer expanding without using Fortran runtime calls."), ::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 "Intrinsics simplification"; }

  /// 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("Enable experimental code that may not always work correctly"), ::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 "Region simplification"; }

  /// 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 "Move local array allocations from heap memory into stack memory"; }

  /// 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 "Insert stacksave/stackrestore in region with allocas"; }

  /// 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 "Add vscale_range attribute to functions"; }

  /// 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("vector scale range"), ::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

//===----------------------------------------------------------------------===//
// AbstractResultOpt Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// AddAliasTags Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// AddDebugInfo Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// AffineDialectDemotion Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// AffineDialectPromotion Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// AlgebraicSimplification Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// AnnotateConstantOperands Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// ArrayValueCopy Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// AssumedRankOpConversion Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// CFGConversion Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// CUFAddConstructor Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// CUFComputeSharedMemoryOffsetsAndSize Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// CUFDeviceGlobal Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// CUFGPUToLLVMConversion Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// CUFOpConversion Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// CharacterConversion Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// CompilerGeneratedNamesConversion Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// ConstantArgumentGlobalisationOpt Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// ExternalNameConversion Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// FIRToSCFPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// FunctionAttr Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// GenRuntimeCallsForTest Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// LoopVersioning Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// MemRefDataFlowOpt Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// MemoryAllocationOpt Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// OptimizeArrayRepacking Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// PolymorphicOpConversion Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// SetRuntimeCallAttributes Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// SimplifyFIROperations Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// SimplifyIntrinsics Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// SimplifyRegionLite Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// StackArrays Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// StackReclaim Registration
//===----------------------------------------------------------------------===//

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

//===----------------------------------------------------------------------===//
// VScaleAttr Registration
//===----------------------------------------------------------------------===//

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

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

inline void registerOptTransformPasses() {
  registerAbstractResultOpt();
  registerAddAliasTags();
  registerAddDebugInfo();
  registerAffineDialectDemotion();
  registerAffineDialectPromotion();
  registerAlgebraicSimplification();
  registerAnnotateConstantOperands();
  registerArrayValueCopy();
  registerAssumedRankOpConversion();
  registerCFGConversion();
  registerCUFAddConstructor();
  registerCUFComputeSharedMemoryOffsetsAndSize();
  registerCUFDeviceGlobal();
  registerCUFGPUToLLVMConversion();
  registerCUFOpConversion();
  registerCharacterConversion();
  registerCompilerGeneratedNamesConversion();
  registerConstantArgumentGlobalisationOpt();
  registerExternalNameConversion();
  registerFIRToSCFPass();
  registerFunctionAttr();
  registerGenRuntimeCallsForTest();
  registerLoopVersioning();
  registerMemRefDataFlowOpt();
  registerMemoryAllocationOpt();
  registerOptimizeArrayRepacking();
  registerPolymorphicOpConversion();
  registerSetRuntimeCallAttributes();
  registerSimplifyFIROperations();
  registerSimplifyIntrinsics();
  registerSimplifyRegionLite();
  registerStackArrays();
  registerStackReclaim();
  registerVScaleAttr();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
// Deprecated. Please use the new per-pass macros.
#ifdef GEN_PASS_CLASSES

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 "Convert fir.array, fir.box and fir.rec function result to function argument"; }

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

  /// Register the dialects 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>)

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

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 "Add tbaa tags to operations that implement FirAliasAnalysisOpInterface"; }

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

  /// Register the dialects 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:
};

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 "Add the debug info"; }

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

  /// Register the dialects 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>)

protected:
  ::mlir::Pass::Option<mlir::LLVM::DIEmissionKind> debugLevel{*this, "debug-level", ::llvm::cl::desc("debug level"), ::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("is optimized."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<std::string> inputFilename{*this, "file-name", ::llvm::cl::desc("name of the input source file"), ::llvm::cl::init(std::string{})};
};

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 "Converts `affine.{load,store}` back to fir operations"; }

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

  /// Register the dialects 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:
};

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 "Promotes `fir.{do_loop,if}` to `affine.{for,if}`."; }

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

  /// Register the dialects 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:
};

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 ""; }

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

  /// Register the dialects 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:
};

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 "Annotate constant operands to all FIR operations"; }

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

  /// Register the dialects 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:
};

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 "Convert array value operations to memory operations."; }

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

  /// Register the dialects 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>)

protected:
  ::mlir::Pass::Option<bool> optimizeConflicts{*this, "optimize-conflicts", ::llvm::cl::desc("do more detailed conflict analysis to reduce the number of temporaries"), ::llvm::cl::init(false)};
};

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 "Simplify operations on assumed-rank types"; }

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

  /// Register the dialects 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:
};

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 "Convert FIR structured control flow ops to CFG ops."; }

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

  /// Register the dialects 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>)

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

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 "Add constructor to register CUDA Fortran allocators"; }

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

  /// Register the dialects 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:
};

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 "Create the shared memory global variable and set offsets"; }

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

  /// Register the dialects 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:
};

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 "Flag globals used in device function with data attribute"; }

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

  /// Register the dialects 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:
};

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 "Convert some GPU operations lowered from CUF to runtime calls"; }

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

  /// Register the dialects 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:
};

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 "Convert some CUF operations to runtime calls"; }

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

  /// Register the dialects 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>)

protected:
};

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 "Convert CHARACTER entities with different KINDs"; }

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

  /// Register the dialects 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>)

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

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 "Convert names of compiler generated globals"; }

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

  /// Register the dialects that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  }

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

protected:
};

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 "Convert constant function arguments to global constants."; }

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

  /// Register the dialects 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:
};

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 "Convert name for external interoperability"; }

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

  /// Register the dialects that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  }

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

protected:
  ::mlir::Pass::Option<bool> appendUnderscoreOpt{*this, "append-underscore", ::llvm::cl::desc("Append trailing underscore to external names."), ::llvm::cl::init(true)};
};

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 "Convert FIR structured control flow ops to SCF dialect."; }

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

  /// Register the dialects 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>)

protected:
};

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 "Pass that adds function attributes expected at LLVM IR level"; }

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

  /// Register the dialects that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  }

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

protected:
  ::mlir::Pass::Option<mlir::LLVM::framePointerKind::FramePointerKind> framePointerKind{*this, "frame-pointer", ::llvm::cl::desc("frame pointer"), ::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", "")
          )};
  ::mlir::Pass::Option<std::string> instrumentFunctionEntry{*this, "instrument-function-entry", ::llvm::cl::desc("Sets the name of the profiling function called during function entry")};
  ::mlir::Pass::Option<std::string> instrumentFunctionExit{*this, "instrument-function-exit", ::llvm::cl::desc("Sets the name of the profiling function called during function exit")};
  ::mlir::Pass::Option<bool> noInfsFPMath{*this, "no-infs-fp-math", ::llvm::cl::desc("Set the no-infs-fp-math attribute on functions in the module."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> noNaNsFPMath{*this, "no-nans-fp-math", ::llvm::cl::desc("Set the no-nans-fp-math attribute on functions in the module."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> approxFuncFPMath{*this, "approx-func-fp-math", ::llvm::cl::desc("Set the afn flag on instructions in the module."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> noSignedZerosFPMath{*this, "no-signed-zeros-fp-math", ::llvm::cl::desc("Set the no-signed-zeros-fp-math attribute on functions in the module."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> unsafeFPMath{*this, "unsafe-fp-math", ::llvm::cl::desc("Set the unsafe-fp-math attribute on functions in the module."), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<std::string> reciprocals{*this, "mrecip", ::llvm::cl::desc("Set the reciprocal-estimates attribute on functions in the module.")};
  ::mlir::Pass::Option<std::string> preferVectorWidth{*this, "prefer-vector-width", ::llvm::cl::desc("Set the prefer-vector-width attribute on functions in the module.")};
  ::mlir::Pass::Option<std::string> tuneCPU{*this, "tune-cpu", ::llvm::cl::desc("Set the tune-cpu attribute on functions in the module.")};
  ::mlir::Pass::Option<bool> setNoCapture{*this, "set-nocapture", ::llvm::cl::desc("Set LLVM nocapture attribute on function arguments, if possible"), ::llvm::cl::init(false)};
  ::mlir::Pass::Option<bool> setNoAlias{*this, "set-noalias", ::llvm::cl::desc("Set LLVM noalias attribute on function arguments, if possible"), ::llvm::cl::init(false)};
};

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 "Print FIR containing declarations/calls of Fortran runtime functions"; }

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

  /// Register the dialects 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>)

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

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 "Loop Versioning"; }

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

  /// Register the dialects 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:
};

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 "Perform store/load forwarding and potentially removing dead stores."; }

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

  /// Register the dialects 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:
};

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 "Convert stack to heap allocations and vice versa."; }

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

  /// Register the dialects 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>)

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

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 "Optimizes redundant array repacking operations"; }

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

  /// Register the dialects that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  }

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

protected:
};

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 "Simplify operations on polymorphic types"; }

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

  /// Register the dialects 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:
};

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 "Set Fortran runtime fir.call attributes targeting LLVM IR"; }

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

  /// Register the dialects 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:
};

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 "Simplifies complex FIR operations"; }

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

  /// Register the dialects that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  }

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

protected:
  ::mlir::Pass::Option<bool> preferInlineImplementation{*this, "prefer-inline-implementation", ::llvm::cl::desc("Prefer expanding without using Fortran runtime calls."), ::llvm::cl::init(false)};
};

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 "Intrinsics simplification"; }

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

  /// Register the dialects that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  }

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

protected:
  ::mlir::Pass::Option<bool> enableExperimental{*this, "enable-experimental", ::llvm::cl::desc("Enable experimental code that may not always work correctly"), ::llvm::cl::init(false)};
};

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 "Region simplification"; }

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

  /// Register the dialects that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  }

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

protected:
};

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 "Move local array allocations from heap memory into stack memory"; }

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

  /// Register the dialects 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:
};

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 "Insert stacksave/stackrestore in region with allocas"; }

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

  /// Register the dialects 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:
};

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 "Add vscale_range attribute to functions"; }

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

  /// Register the dialects that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  }

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

protected:
  ::mlir::Pass::Option<std::pair<unsigned, unsigned>> vscaleRange{*this, "vscale-range", ::llvm::cl::desc("vector scale range"), ::llvm::cl::init(std::pair<unsigned, unsigned>{})};
};
#undef GEN_PASS_CLASSES
#endif // GEN_PASS_CLASSES
