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

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_BUFFERIZEHLFIR
#define GEN_PASS_DECL_CONVERTHLFIRTOFIR
#define GEN_PASS_DECL_INLINEELEMENTALS
#define GEN_PASS_DECL_LOWERHLFIRINTRINSICS
#define GEN_PASS_DECL_LOWERHLFIRORDEREDASSIGNMENTS
#define GEN_PASS_DECL_OPTIMIZEDBUFFERIZATION
#define GEN_PASS_DECL_SIMPLIFYHLFIRINTRINSICS
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// BufferizeHLFIR
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_BUFFERIZEHLFIR
std::unique_ptr<::mlir::Pass> createBufferizeHLFIR();
#undef GEN_PASS_DECL_BUFFERIZEHLFIR
#endif // GEN_PASS_DECL_BUFFERIZEHLFIR
#ifdef GEN_PASS_DEF_BUFFERIZEHLFIR

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Convert HLFIR operations operating on hlfir.expr into operations on memory"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// ConvertHLFIRtoFIR
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CONVERTHLFIRTOFIR
std::unique_ptr<::mlir::Pass> createConvertHLFIRtoFIR();
#undef GEN_PASS_DECL_CONVERTHLFIRTOFIR
#endif // GEN_PASS_DECL_CONVERTHLFIRTOFIR
#ifdef GEN_PASS_DEF_CONVERTHLFIRTOFIR

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Lower High-Level FIR to FIR"; }

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

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

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// InlineElementals
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_INLINEELEMENTALS
std::unique_ptr<::mlir::Pass> createInlineElementals();
#undef GEN_PASS_DECL_INLINEELEMENTALS
#endif // GEN_PASS_DECL_INLINEELEMENTALS
#ifdef GEN_PASS_DEF_INLINEELEMENTALS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Inline chained hlfir.elemental operations"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// LowerHLFIRIntrinsics
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LOWERHLFIRINTRINSICS
std::unique_ptr<::mlir::Pass> createLowerHLFIRIntrinsics();
#undef GEN_PASS_DECL_LOWERHLFIRINTRINSICS
#endif // GEN_PASS_DECL_LOWERHLFIRINTRINSICS
#ifdef GEN_PASS_DEF_LOWERHLFIRINTRINSICS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Lower HLFIR transformational intrinsic operations"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// LowerHLFIROrderedAssignments
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LOWERHLFIRORDEREDASSIGNMENTS
struct LowerHLFIROrderedAssignmentsOptions {
  bool tryFusingAssignments = false;
};
std::unique_ptr<::mlir::Pass> createLowerHLFIROrderedAssignments();
std::unique_ptr<::mlir::Pass> createLowerHLFIROrderedAssignments(const LowerHLFIROrderedAssignmentsOptions &options);
#undef GEN_PASS_DECL_LOWERHLFIRORDEREDASSIGNMENTS
#endif // GEN_PASS_DECL_LOWERHLFIRORDEREDASSIGNMENTS
#ifdef GEN_PASS_DEF_LOWERHLFIRORDEREDASSIGNMENTS

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createLowerHLFIROrderedAssignments(const LowerHLFIROrderedAssignmentsOptions &options);
} // namespace impl
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return "Lower HLFIR ordered assignments like forall and where operations"; }

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

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

  LowerHLFIROrderedAssignmentsBase(const LowerHLFIROrderedAssignmentsOptions &options) : LowerHLFIROrderedAssignmentsBase() {
    tryFusingAssignments = options.tryFusingAssignments;
  }
protected:
  ::mlir::Pass::Option<bool> tryFusingAssignments{*this, "fuse-assignments", ::llvm::cl::desc("Fuse Forall and Where assignments in the same loop nest when legal.It is not clear yet if this is always beneficial. It may be best toleave this to later loop optimizations.Hence this is off by default."), ::llvm::cl::init(false)};
private:

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

  friend std::unique_ptr<::mlir::Pass> createLowerHLFIROrderedAssignments(const LowerHLFIROrderedAssignmentsOptions &options) {
    return std::make_unique<DerivedT>(options);
  }
};
} // namespace impl

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

std::unique_ptr<::mlir::Pass> createLowerHLFIROrderedAssignments(const LowerHLFIROrderedAssignmentsOptions &options) {
  return impl::createLowerHLFIROrderedAssignments(options);
}
#undef GEN_PASS_DEF_LOWERHLFIRORDEREDASSIGNMENTS
#endif // GEN_PASS_DEF_LOWERHLFIRORDEREDASSIGNMENTS

//===----------------------------------------------------------------------===//
// OptimizedBufferization
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_OPTIMIZEDBUFFERIZATION
std::unique_ptr<::mlir::Pass> createOptimizedBufferization();
#undef GEN_PASS_DECL_OPTIMIZEDBUFFERIZATION
#endif // GEN_PASS_DECL_OPTIMIZEDBUFFERIZATION
#ifdef GEN_PASS_DEF_OPTIMIZEDBUFFERIZATION

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Special cases for hlfir.expr bufferization where we can avoid a temporary which would be created by the generic bufferization pass"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// SimplifyHLFIRIntrinsics
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SIMPLIFYHLFIRINTRINSICS
std::unique_ptr<::mlir::Pass> createSimplifyHLFIRIntrinsics();
#undef GEN_PASS_DECL_SIMPLIFYHLFIRINTRINSICS
#endif // GEN_PASS_DECL_SIMPLIFYHLFIRINTRINSICS
#ifdef GEN_PASS_DEF_SIMPLIFYHLFIRINTRINSICS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Simplify HLFIR intrinsic operations that don't need to result in runtime calls"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// BufferizeHLFIR Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// ConvertHLFIRtoFIR Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// InlineElementals Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// LowerHLFIRIntrinsics Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// LowerHLFIROrderedAssignments Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// OptimizedBufferization Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// SimplifyHLFIRIntrinsics Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// HLFIR Registration
//===----------------------------------------------------------------------===//

inline void registerHLFIRPasses() {
  registerBufferizeHLFIR();
  registerConvertHLFIRtoFIR();
  registerInlineElementals();
  registerLowerHLFIRIntrinsics();
  registerLowerHLFIROrderedAssignments();
  registerOptimizedBufferization();
  registerSimplifyHLFIRIntrinsics();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
// Deprecated. Please use the new per-pass macros.
#ifdef GEN_PASS_CLASSES

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

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

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

  ::llvm::StringRef getDescription() const override { return "Convert HLFIR operations operating on hlfir.expr into operations on memory"; }

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

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

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Lower High-Level FIR to FIR"; }

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

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

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

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

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

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Inline chained hlfir.elemental operations"; }

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

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

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Lower HLFIR transformational intrinsic operations"; }

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

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

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Lower HLFIR ordered assignments like forall and where operations"; }

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

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

protected:
  ::mlir::Pass::Option<bool> tryFusingAssignments{*this, "fuse-assignments", ::llvm::cl::desc("Fuse Forall and Where assignments in the same loop nest when legal.It is not clear yet if this is always beneficial. It may be best toleave this to later loop optimizations.Hence this is off by default."), ::llvm::cl::init(false)};
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Special cases for hlfir.expr bufferization where we can avoid a temporary which would be created by the generic bufferization pass"; }

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

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

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Simplify HLFIR intrinsic operations that don't need to result in runtime calls"; }

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

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

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