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

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_BROADCASTPROPAGATIONPASS
#define GEN_PASS_DECL_CHLOLEGALIZETOHLOPASS
#define GEN_PASS_DECL_CHLOLEGALIZETOLINALGPASS
#define GEN_PASS_DECL_COLLAPSEELEMENTWISEMAPPASS
#define GEN_PASS_DECL_CONSTRAINTFUSIONPASS
#define GEN_PASS_DECL_CONVERTTOSIGNLESSPASS
#define GEN_PASS_DECL_EXPANDHLOTUPLESPASS
#define GEN_PASS_DECL_FLATTENTUPLEPASS
#define GEN_PASS_DECL_GROUPREDUCTIONDIMENSIONSPASS
#define GEN_PASS_DECL_HLOCANONICALIZEGATHERPASS
#define GEN_PASS_DECL_HLOCANONICALIZEREDUCTIONPASS
#define GEN_PASS_DECL_HLOCANONICALIZESCATTERPASS
#define GEN_PASS_DECL_HLOLEGALIZESHAPECOMPUTATIONSPASS
#define GEN_PASS_DECL_HLOLEGALIZESHAPEOPSTOSTANDARDPASS
#define GEN_PASS_DECL_HLOLEGALIZESORTPASS
#define GEN_PASS_DECL_HLOLEGALIZETOARITHMETICPASS
#define GEN_PASS_DECL_HLOLEGALIZETOLHLOPASS
#define GEN_PASS_DECL_HLOLEGALIZETOLINALGPASS
#define GEN_PASS_DECL_HLOLEGALIZETOMEMREFPASS
#define GEN_PASS_DECL_HLOLEGALIZETOSTABLEHLOPASS
#define GEN_PASS_DECL_LEGALIZECONTROLFLOWPASS
#define GEN_PASS_DECL_LEGALIZEEINSUMTODOTGENERALPASS
#define GEN_PASS_DECL_LEGALIZEGATHERTOTORCHINDEXSELECTPASS
#define GEN_PASS_DECL_LEGALIZEGENERALDOTPASS
#define GEN_PASS_DECL_LEGALIZEMHLOTOTHLOPASS
#define GEN_PASS_DECL_LEGALIZETANHTOAPPROXIMATIONPASS
#define GEN_PASS_DECL_LEGALIZETOSTANDARDPASS
#define GEN_PASS_DECL_LOWERCOMPLEXPASS
#define GEN_PASS_DECL_MERGEASSUMINGOPSPASS
#define GEN_PASS_DECL_MHLOEXPANDOPSSIMPLIFIERPASS
#define GEN_PASS_DECL_OPTIMIZEMHLOPASS
#define GEN_PASS_DECL_PREPAREFOREXPORTPASS
#define GEN_PASS_DECL_RANKSPECIALIZATIONCLUSTERPASS
#define GEN_PASS_DECL_RANKSPECIALIZATIONTOSCFPASS
#define GEN_PASS_DECL_RESTRICTMAXRANKPASS
#define GEN_PASS_DECL_SHAPEREIFICATIONPASS
#define GEN_PASS_DECL_SHAPESIMPLIFICATION
#define GEN_PASS_DECL_SINKCONSTANTSTOCONTROLFLOWPASS
#define GEN_PASS_DECL_SPARSEREWRITINGPASS
#define GEN_PASS_DECL_STABLEHLOLEGALIZETOHLOPASS
#define GEN_PASS_DECL_SYMBOLICSHAPEOPTIMIZATION
#define GEN_PASS_DECL_TESTINFERSHAPEDTYPEMETHODSPASS
#define GEN_PASS_DECL_TESTMATERIALIZEBROADCASTSPASS
#define GEN_PASS_DECL_TESTUNFUSEBATCHNORMPASS
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// BroadcastPropagationPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_BROADCASTPROPAGATIONPASS
#undef GEN_PASS_DECL_BROADCASTPROPAGATIONPASS
#endif // GEN_PASS_DECL_BROADCASTPROPAGATIONPASS
#ifdef GEN_PASS_DEF_BROADCASTPROPAGATIONPASS
namespace impl {

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

  BroadcastPropagationPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  BroadcastPropagationPassBase(const BroadcastPropagationPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Move dynamic broadcasts up over element-wise operations and broadcast the operands rather than the result. This will eventually allow for larger fusions."; }

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

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

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

//===----------------------------------------------------------------------===//
// ChloLegalizeToHloPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CHLOLEGALIZETOHLOPASS
struct ChloLegalizeToHloPassOptions {
  bool legalize_broadcasts_ = true;
  bool expand_compositions_ = true;
};
#undef GEN_PASS_DECL_CHLOLEGALIZETOHLOPASS
#endif // GEN_PASS_DECL_CHLOLEGALIZETOHLOPASS
#ifdef GEN_PASS_DEF_CHLOLEGALIZETOHLOPASS
namespace impl {

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

  ChloLegalizeToHloPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  ChloLegalizeToHloPassBase(const ChloLegalizeToHloPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize CHLO to HLO."; }

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

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

  ChloLegalizeToHloPassBase(const ChloLegalizeToHloPassOptions &options) : ChloLegalizeToHloPassBase() {
    legalize_broadcasts_ = options.legalize_broadcasts_;
    expand_compositions_ = options.expand_compositions_;
  }
protected:
  ::mlir::Pass::Option<bool> legalize_broadcasts_{*this, "legalize-broadcasts", ::llvm::cl::desc("Legalize implicit broadcasts to explicit HLO broadcasting forms"), ::llvm::cl::init(true)};
  ::mlir::Pass::Option<bool> expand_compositions_{*this, "expand-compositions", ::llvm::cl::desc("Expands client-centric compositions to HLO primitives"), ::llvm::cl::init(true)};
private:
};
} // namespace impl
#undef GEN_PASS_DEF_CHLOLEGALIZETOHLOPASS
#endif // GEN_PASS_DEF_CHLOLEGALIZETOHLOPASS

//===----------------------------------------------------------------------===//
// ChloLegalizeToLinalgPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CHLOLEGALIZETOLINALGPASS
#undef GEN_PASS_DECL_CHLOLEGALIZETOLINALGPASS
#endif // GEN_PASS_DECL_CHLOLEGALIZETOLINALGPASS
#ifdef GEN_PASS_DEF_CHLOLEGALIZETOLINALGPASS
namespace impl {

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

  ChloLegalizeToLinalgPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  ChloLegalizeToLinalgPassBase(const ChloLegalizeToLinalgPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from sparse ops in CHLO dialect to Linalg dialect."; }

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

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

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

//===----------------------------------------------------------------------===//
// CollapseElementwiseMapPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_COLLAPSEELEMENTWISEMAPPASS
#undef GEN_PASS_DECL_COLLAPSEELEMENTWISEMAPPASS
#endif // GEN_PASS_DECL_COLLAPSEELEMENTWISEMAPPASS
#ifdef GEN_PASS_DEF_COLLAPSEELEMENTWISEMAPPASS
namespace impl {

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

  CollapseElementwiseMapPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  CollapseElementwiseMapPassBase(const CollapseElementwiseMapPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Collapse the mhlo.map if the map only has elementwise ops."; }

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

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

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

//===----------------------------------------------------------------------===//
// ConstraintFusionPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CONSTRAINTFUSIONPASS
#undef GEN_PASS_DECL_CONSTRAINTFUSIONPASS
#endif // GEN_PASS_DECL_CONSTRAINTFUSIONPASS
#ifdef GEN_PASS_DEF_CONSTRAINTFUSIONPASS
namespace impl {

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

  ConstraintFusionPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  ConstraintFusionPassBase(const ConstraintFusionPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Fuse shape constraints and merge all assuming regions."; }

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

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

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

//===----------------------------------------------------------------------===//
// ConvertToSignlessPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CONVERTTOSIGNLESSPASS
#undef GEN_PASS_DECL_CONVERTTOSIGNLESSPASS
#endif // GEN_PASS_DECL_CONVERTTOSIGNLESSPASS
#ifdef GEN_PASS_DEF_CONVERTTOSIGNLESSPASS
namespace impl {

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

  ConvertToSignlessPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  ConvertToSignlessPassBase(const ConvertToSignlessPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Pass to transform the IR to be on signless integers."; }

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

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

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

//===----------------------------------------------------------------------===//
// ExpandHloTuplesPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_EXPANDHLOTUPLESPASS
struct ExpandHloTuplesPassOptions {
  std::string entry_function_name_;
};
#undef GEN_PASS_DECL_EXPANDHLOTUPLESPASS
#endif // GEN_PASS_DECL_EXPANDHLOTUPLESPASS
#ifdef GEN_PASS_DEF_EXPANDHLOTUPLESPASS
namespace impl {

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

  ExpandHloTuplesPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  ExpandHloTuplesPassBase(const ExpandHloTuplesPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Expand HLO tuple for the entry function of the module."; }

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

  /// 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<mhlo::MhloDialect>();

  }

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

  ExpandHloTuplesPassBase(const ExpandHloTuplesPassOptions &options) : ExpandHloTuplesPassBase() {
    entry_function_name_ = options.entry_function_name_;
  }
protected:
  ::mlir::Pass::Option<std::string> entry_function_name_{*this, "entry-function", ::llvm::cl::desc("the name of entry function of the module")};
private:
};
} // namespace impl
#undef GEN_PASS_DEF_EXPANDHLOTUPLESPASS
#endif // GEN_PASS_DEF_EXPANDHLOTUPLESPASS

//===----------------------------------------------------------------------===//
// FlattenTuplePass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_FLATTENTUPLEPASS
#undef GEN_PASS_DECL_FLATTENTUPLEPASS
#endif // GEN_PASS_DECL_FLATTENTUPLEPASS
#ifdef GEN_PASS_DEF_FLATTENTUPLEPASS
namespace impl {

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

  FlattenTuplePassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  FlattenTuplePassBase(const FlattenTuplePassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Flatten tuples in operands and results of operators that support both tuple and variadic type."; }

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

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

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

//===----------------------------------------------------------------------===//
// GroupReductionDimensionsPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_GROUPREDUCTIONDIMENSIONSPASS
struct GroupReductionDimensionsPassOptions {
  bool prefer_columns_reductions_ = true;
};
#undef GEN_PASS_DECL_GROUPREDUCTIONDIMENSIONSPASS
#endif // GEN_PASS_DECL_GROUPREDUCTIONDIMENSIONSPASS
#ifdef GEN_PASS_DEF_GROUPREDUCTIONDIMENSIONSPASS
namespace impl {

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

  GroupReductionDimensionsPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  GroupReductionDimensionsPassBase(const GroupReductionDimensionsPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Group dimensions of reduction operations"; }

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

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

  GroupReductionDimensionsPassBase(const GroupReductionDimensionsPassOptions &options) : GroupReductionDimensionsPassBase() {
    prefer_columns_reductions_ = options.prefer_columns_reductions_;
  }
protected:
  ::mlir::Pass::Option<bool> prefer_columns_reductions_{*this, "prefer-columns-reductions", ::llvm::cl::desc("When simplifying reductions, prefer to use column reductions over row reductions."), ::llvm::cl::init(true)};
private:
};
} // namespace impl
#undef GEN_PASS_DEF_GROUPREDUCTIONDIMENSIONSPASS
#endif // GEN_PASS_DEF_GROUPREDUCTIONDIMENSIONSPASS

//===----------------------------------------------------------------------===//
// HloCanonicalizeGatherPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_HLOCANONICALIZEGATHERPASS
#undef GEN_PASS_DECL_HLOCANONICALIZEGATHERPASS
#endif // GEN_PASS_DECL_HLOCANONICALIZEGATHERPASS
#ifdef GEN_PASS_DEF_HLOCANONICALIZEGATHERPASS
namespace impl {

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

  HloCanonicalizeGatherPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloCanonicalizeGatherPassBase(const HloCanonicalizeGatherPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Rewrites gather into transposes, reshapes and a simple gather."; }

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

  /// 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<mhlo::MhloDialect>();

  registry.insert<tensor::TensorDialect>();

  }

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

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

//===----------------------------------------------------------------------===//
// HloCanonicalizeReductionPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_HLOCANONICALIZEREDUCTIONPASS
#undef GEN_PASS_DECL_HLOCANONICALIZEREDUCTIONPASS
#endif // GEN_PASS_DECL_HLOCANONICALIZEREDUCTIONPASS
#ifdef GEN_PASS_DEF_HLOCANONICALIZEREDUCTIONPASS
namespace impl {

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

  HloCanonicalizeReductionPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloCanonicalizeReductionPassBase(const HloCanonicalizeReductionPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Canonicalize reduction ops to be suitable for codegen."; }

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

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

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

//===----------------------------------------------------------------------===//
// HloCanonicalizeScatterPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_HLOCANONICALIZESCATTERPASS
#undef GEN_PASS_DECL_HLOCANONICALIZESCATTERPASS
#endif // GEN_PASS_DECL_HLOCANONICALIZESCATTERPASS
#ifdef GEN_PASS_DEF_HLOCANONICALIZESCATTERPASS
namespace impl {

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

  HloCanonicalizeScatterPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloCanonicalizeScatterPassBase(const HloCanonicalizeScatterPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Rewrites scatter into transposes, reshapes and a simple scatter."; }

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

  /// 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<mhlo::MhloDialect>();

  registry.insert<tensor::TensorDialect>();

  }

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeShapeComputationsPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_HLOLEGALIZESHAPECOMPUTATIONSPASS
#undef GEN_PASS_DECL_HLOLEGALIZESHAPECOMPUTATIONSPASS
#endif // GEN_PASS_DECL_HLOLEGALIZESHAPECOMPUTATIONSPASS
#ifdef GEN_PASS_DEF_HLOLEGALIZESHAPECOMPUTATIONSPASS
namespace impl {

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

  HloLegalizeShapeComputationsPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeShapeComputationsPassBase(const HloLegalizeShapeComputationsPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize HLOs shape operations to core-mlir operations."; }

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

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeShapeOpsToStandardPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_HLOLEGALIZESHAPEOPSTOSTANDARDPASS
#undef GEN_PASS_DECL_HLOLEGALIZESHAPEOPSTOSTANDARDPASS
#endif // GEN_PASS_DECL_HLOLEGALIZESHAPEOPSTOSTANDARDPASS
#ifdef GEN_PASS_DEF_HLOLEGALIZESHAPEOPSTOSTANDARDPASS
namespace impl {

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

  HloLegalizeShapeOpsToStandardPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeShapeOpsToStandardPassBase(const HloLegalizeShapeOpsToStandardPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize shape operations from HLO dialect to standard dialect."; }

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

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeSortPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_HLOLEGALIZESORTPASS
#undef GEN_PASS_DECL_HLOLEGALIZESORTPASS
#endif // GEN_PASS_DECL_HLOLEGALIZESORTPASS
#ifdef GEN_PASS_DEF_HLOLEGALIZESORTPASS
namespace impl {

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

  HloLegalizeSortPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeSortPassBase(const HloLegalizeSortPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from MHLO sort to SCF control flow."; }

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

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

  registry.insert<bufferization::BufferizationDialect>();

  registry.insert<scf::SCFDialect>();

  registry.insert<tensor::TensorDialect>();

  }

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeToArithmeticPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_HLOLEGALIZETOARITHMETICPASS
#undef GEN_PASS_DECL_HLOLEGALIZETOARITHMETICPASS
#endif // GEN_PASS_DECL_HLOLEGALIZETOARITHMETICPASS
#ifdef GEN_PASS_DEF_HLOLEGALIZETOARITHMETICPASS
namespace impl {

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

  HloLegalizeToArithmeticPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeToArithmeticPassBase(const HloLegalizeToArithmeticPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from HLO dialect to arithmetic dialect."; }

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

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeToLhloPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_HLOLEGALIZETOLHLOPASS
#undef GEN_PASS_DECL_HLOLEGALIZETOLHLOPASS
#endif // GEN_PASS_DECL_HLOLEGALIZETOLHLOPASS
#ifdef GEN_PASS_DEF_HLOLEGALIZETOLHLOPASS
namespace impl {

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

  HloLegalizeToLhloPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeToLhloPassBase(const HloLegalizeToLhloPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from HLO dialect to LHLO dialect."; }

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

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeToLinalgPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_HLOLEGALIZETOLINALGPASS
struct HloLegalizeToLinalgPassOptions {
  bool enablePrimitiveOps = false;
};
#undef GEN_PASS_DECL_HLOLEGALIZETOLINALGPASS
#endif // GEN_PASS_DECL_HLOLEGALIZETOLINALGPASS
#ifdef GEN_PASS_DEF_HLOLEGALIZETOLINALGPASS
namespace impl {

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

  HloLegalizeToLinalgPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeToLinalgPassBase(const HloLegalizeToLinalgPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from HLO dialect to Linalg dialect."; }

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

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

  HloLegalizeToLinalgPassBase(const HloLegalizeToLinalgPassOptions &options) : HloLegalizeToLinalgPassBase() {
    enablePrimitiveOps = options.enablePrimitiveOps;
  }
protected:
  ::mlir::Pass::Option<bool> enablePrimitiveOps{*this, "enable-primitive-ops", ::llvm::cl::desc("Lower to primitive Linalg ops (map, reduce and transpose) when possible, instead of linalg.generic"), ::llvm::cl::init(false)};
private:
};
} // namespace impl
#undef GEN_PASS_DEF_HLOLEGALIZETOLINALGPASS
#endif // GEN_PASS_DEF_HLOLEGALIZETOLINALGPASS

//===----------------------------------------------------------------------===//
// HloLegalizeToMemrefPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_HLOLEGALIZETOMEMREFPASS
#undef GEN_PASS_DECL_HLOLEGALIZETOMEMREFPASS
#endif // GEN_PASS_DECL_HLOLEGALIZETOMEMREFPASS
#ifdef GEN_PASS_DEF_HLOLEGALIZETOMEMREFPASS
namespace impl {

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

  HloLegalizeToMemrefPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeToMemrefPassBase(const HloLegalizeToMemrefPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from HLO dialect to memref dialect."; }

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

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeToStablehloPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_HLOLEGALIZETOSTABLEHLOPASS
struct HloLegalizeToStablehloPassOptions {
  bool allow_experimental_features_ = false;
};
#undef GEN_PASS_DECL_HLOLEGALIZETOSTABLEHLOPASS
#endif // GEN_PASS_DECL_HLOLEGALIZETOSTABLEHLOPASS
#ifdef GEN_PASS_DEF_HLOLEGALIZETOSTABLEHLOPASS
namespace impl {

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

  HloLegalizeToStablehloPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeToStablehloPassBase(const HloLegalizeToStablehloPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize HLO to StableHLO."; }

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

  /// 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<stablehlo::StablehloDialect>();

  }

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

  HloLegalizeToStablehloPassBase(const HloLegalizeToStablehloPassOptions &options) : HloLegalizeToStablehloPassBase() {
    allow_experimental_features_ = options.allow_experimental_features_;
  }
protected:
  ::mlir::Pass::Option<bool> allow_experimental_features_{*this, "allow-experimental-features", ::llvm::cl::desc("Allow legalization of experimental MHLO features via StableHLO custom_call"), ::llvm::cl::init(false)};
private:
};
} // namespace impl
#undef GEN_PASS_DEF_HLOLEGALIZETOSTABLEHLOPASS
#endif // GEN_PASS_DEF_HLOLEGALIZETOSTABLEHLOPASS

//===----------------------------------------------------------------------===//
// LegalizeControlFlowPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LEGALIZECONTROLFLOWPASS
#undef GEN_PASS_DECL_LEGALIZECONTROLFLOWPASS
#endif // GEN_PASS_DECL_LEGALIZECONTROLFLOWPASS
#ifdef GEN_PASS_DEF_LEGALIZECONTROLFLOWPASS
namespace impl {

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

  LegalizeControlFlowPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeControlFlowPassBase(const LegalizeControlFlowPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from MHLO control flow to SCF control flow."; }

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

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

  registry.insert<tensor::TensorDialect>();

  }

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

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

//===----------------------------------------------------------------------===//
// LegalizeEinsumToDotGeneralPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LEGALIZEEINSUMTODOTGENERALPASS
#undef GEN_PASS_DECL_LEGALIZEEINSUMTODOTGENERALPASS
#endif // GEN_PASS_DECL_LEGALIZEEINSUMTODOTGENERALPASS
#ifdef GEN_PASS_DEF_LEGALIZEEINSUMTODOTGENERALPASS
namespace impl {

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

  LegalizeEinsumToDotGeneralPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeEinsumToDotGeneralPassBase(const LegalizeEinsumToDotGeneralPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalizes einsum ops to dot_general ops."; }

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

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

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

//===----------------------------------------------------------------------===//
// LegalizeGatherToTorchIndexSelectPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LEGALIZEGATHERTOTORCHINDEXSELECTPASS
#undef GEN_PASS_DECL_LEGALIZEGATHERTOTORCHINDEXSELECTPASS
#endif // GEN_PASS_DECL_LEGALIZEGATHERTOTORCHINDEXSELECTPASS
#ifdef GEN_PASS_DEF_LEGALIZEGATHERTOTORCHINDEXSELECTPASS
namespace impl {

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

  LegalizeGatherToTorchIndexSelectPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeGatherToTorchIndexSelectPassBase(const LegalizeGatherToTorchIndexSelectPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalizes gathers to a torch index select."; }

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

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

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

//===----------------------------------------------------------------------===//
// LegalizeGeneralDotPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LEGALIZEGENERALDOTPASS
#undef GEN_PASS_DECL_LEGALIZEGENERALDOTPASS
#endif // GEN_PASS_DECL_LEGALIZEGENERALDOTPASS
#ifdef GEN_PASS_DEF_LEGALIZEGENERALDOTPASS
namespace impl {

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

  LegalizeGeneralDotPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeGeneralDotPassBase(const LegalizeGeneralDotPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Tests lowering general dot to a non-batched dot when possible."; }

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

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

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

//===----------------------------------------------------------------------===//
// LegalizeMHLOToTHLOPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LEGALIZEMHLOTOTHLOPASS
struct LegalizeMHLOToTHLOPassOptions {
  bool enableExperimental = false;
};
#undef GEN_PASS_DECL_LEGALIZEMHLOTOTHLOPASS
#endif // GEN_PASS_DECL_LEGALIZEMHLOTOTHLOPASS
#ifdef GEN_PASS_DEF_LEGALIZEMHLOTOTHLOPASS
namespace impl {

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

  LegalizeMHLOToTHLOPassBase() : ::mlir::OperationPass<mlir::func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeMHLOToTHLOPassBase(const LegalizeMHLOToTHLOPassBase &other) : ::mlir::OperationPass<mlir::func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from HLO dialect to tHLO dialect."; }

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

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

  registry.insert<complex::ComplexDialect>();

  registry.insert<linalg::LinalgDialect>();

  registry.insert<math::MathDialect>();

  registry.insert<shape::ShapeDialect>();

  registry.insert<tensor::TensorDialect>();

  registry.insert<thlo::THLODialect>();

  }

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

  LegalizeMHLOToTHLOPassBase(const LegalizeMHLOToTHLOPassOptions &options) : LegalizeMHLOToTHLOPassBase() {
    enableExperimental = options.enableExperimental;
  }
protected:
  ::mlir::Pass::Option<bool> enableExperimental{*this, "enable-experimental", ::llvm::cl::desc("Enable conversion to operations that are still under developement and might not be working in some pipelines. For example, thlo.map and thlo.transpose."), ::llvm::cl::init(false)};
private:
};
} // namespace impl
#undef GEN_PASS_DEF_LEGALIZEMHLOTOTHLOPASS
#endif // GEN_PASS_DEF_LEGALIZEMHLOTOTHLOPASS

//===----------------------------------------------------------------------===//
// LegalizeTanhToApproximationPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LEGALIZETANHTOAPPROXIMATIONPASS
#undef GEN_PASS_DECL_LEGALIZETANHTOAPPROXIMATIONPASS
#endif // GEN_PASS_DECL_LEGALIZETANHTOAPPROXIMATIONPASS
#ifdef GEN_PASS_DEF_LEGALIZETANHTOAPPROXIMATIONPASS
namespace impl {

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

  LegalizeTanhToApproximationPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeTanhToApproximationPassBase(const LegalizeTanhToApproximationPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize trigonometric operations from standard dialect to an approximation."; }

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

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

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

//===----------------------------------------------------------------------===//
// LegalizeToStandardPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LEGALIZETOSTANDARDPASS
#undef GEN_PASS_DECL_LEGALIZETOSTANDARDPASS
#endif // GEN_PASS_DECL_LEGALIZETOSTANDARDPASS
#ifdef GEN_PASS_DEF_LEGALIZETOSTANDARDPASS
namespace impl {

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

  LegalizeToStandardPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeToStandardPassBase(const LegalizeToStandardPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from MHLO dialect to standard dialect."; }

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

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

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

//===----------------------------------------------------------------------===//
// LowerComplexPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LOWERCOMPLEXPASS
#undef GEN_PASS_DECL_LOWERCOMPLEXPASS
#endif // GEN_PASS_DECL_LOWERCOMPLEXPASS
#ifdef GEN_PASS_DEF_LOWERCOMPLEXPASS
namespace impl {

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

  LowerComplexPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LowerComplexPassBase(const LowerComplexPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Lower complex operations into non-complex operations."; }

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

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

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

//===----------------------------------------------------------------------===//
// MergeAssumingOpsPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MERGEASSUMINGOPSPASS
#undef GEN_PASS_DECL_MERGEASSUMINGOPSPASS
#endif // GEN_PASS_DECL_MERGEASSUMINGOPSPASS
#ifdef GEN_PASS_DEF_MERGEASSUMINGOPSPASS
namespace impl {

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

  MergeAssumingOpsPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  MergeAssumingOpsPassBase(const MergeAssumingOpsPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Prepare moving dynamic broadcasts up over element-wise operations and broadcast the operands rather than the result. This will eventually allow for larger fusions."; }

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

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

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

//===----------------------------------------------------------------------===//
// MhloExpandOpsSimplifierPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MHLOEXPANDOPSSIMPLIFIERPASS
#undef GEN_PASS_DECL_MHLOEXPANDOPSSIMPLIFIERPASS
#endif // GEN_PASS_DECL_MHLOEXPANDOPSSIMPLIFIERPASS
#ifdef GEN_PASS_DEF_MHLOEXPANDOPSSIMPLIFIERPASS
namespace impl {

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

  MhloExpandOpsSimplifierPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  MhloExpandOpsSimplifierPassBase(const MhloExpandOpsSimplifierPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Expand feature rich mhlo ops into a set of simpler mhlo ops."; }

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

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

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

//===----------------------------------------------------------------------===//
// OptimizeMhloPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_OPTIMIZEMHLOPASS
#undef GEN_PASS_DECL_OPTIMIZEMHLOPASS
#endif // GEN_PASS_DECL_OPTIMIZEMHLOPASS
#ifdef GEN_PASS_DEF_OPTIMIZEMHLOPASS
namespace impl {

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

  OptimizeMhloPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  OptimizeMhloPassBase(const OptimizeMhloPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Run optional HLO optimizations."; }

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

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

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

//===----------------------------------------------------------------------===//
// PrepareForExportPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_PREPAREFOREXPORTPASS
std::unique_ptr<::mlir::Pass> createPrepareForExportPass();
#undef GEN_PASS_DECL_PREPAREFOREXPORTPASS
#endif // GEN_PASS_DECL_PREPAREFOREXPORTPASS
#ifdef GEN_PASS_DEF_PREPAREFOREXPORTPASS

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

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

  PrepareForExportPassBase() : ::mlir::OperationPass<mlir::func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  PrepareForExportPassBase(const PrepareForExportPassBase &other) : ::mlir::OperationPass<mlir::func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Prepare for XLA export"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// RankSpecializationClusterPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_RANKSPECIALIZATIONCLUSTERPASS
#undef GEN_PASS_DECL_RANKSPECIALIZATIONCLUSTERPASS
#endif // GEN_PASS_DECL_RANKSPECIALIZATIONCLUSTERPASS
#ifdef GEN_PASS_DEF_RANKSPECIALIZATIONCLUSTERPASS
namespace impl {

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

  RankSpecializationClusterPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  RankSpecializationClusterPassBase(const RankSpecializationClusterPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

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

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

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

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

//===----------------------------------------------------------------------===//
// RankSpecializationToSCFPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_RANKSPECIALIZATIONTOSCFPASS
struct RankSpecializationToSCFPassOptions {
  int max_target_rank_ = 8;
};
#undef GEN_PASS_DECL_RANKSPECIALIZATIONTOSCFPASS
#endif // GEN_PASS_DECL_RANKSPECIALIZATIONTOSCFPASS
#ifdef GEN_PASS_DEF_RANKSPECIALIZATIONTOSCFPASS
namespace impl {

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

  RankSpecializationToSCFPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  RankSpecializationToSCFPassBase(const RankSpecializationToSCFPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

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

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

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

  RankSpecializationToSCFPassBase(const RankSpecializationToSCFPassOptions &options) : RankSpecializationToSCFPassBase() {
    max_target_rank_ = options.max_target_rank_;
  }
protected:
  ::mlir::Pass::Option<int> max_target_rank_{*this, "max-target-rank", ::llvm::cl::desc("The maximum supported rank after rank specialization. Any argument of greater rank may result in a runtime failure."), ::llvm::cl::init(8)};
private:
};
} // namespace impl
#undef GEN_PASS_DEF_RANKSPECIALIZATIONTOSCFPASS
#endif // GEN_PASS_DEF_RANKSPECIALIZATIONTOSCFPASS

//===----------------------------------------------------------------------===//
// RestrictMaxRankPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_RESTRICTMAXRANKPASS
#undef GEN_PASS_DECL_RESTRICTMAXRANKPASS
#endif // GEN_PASS_DECL_RESTRICTMAXRANKPASS
#ifdef GEN_PASS_DEF_RESTRICTMAXRANKPASS
namespace impl {

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

  RestrictMaxRankPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  RestrictMaxRankPassBase(const RestrictMaxRankPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Restrict maximum rank of any of the intermediate tensors"; }

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

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

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

//===----------------------------------------------------------------------===//
// ShapeReificationPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SHAPEREIFICATIONPASS
#undef GEN_PASS_DECL_SHAPEREIFICATIONPASS
#endif // GEN_PASS_DECL_SHAPEREIFICATIONPASS
#ifdef GEN_PASS_DEF_SHAPEREIFICATIONPASS
namespace impl {

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

  ShapeReificationPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  ShapeReificationPassBase(const ShapeReificationPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Iteratively reify all shape computations."; }

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

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

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

//===----------------------------------------------------------------------===//
// ShapeSimplification
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SHAPESIMPLIFICATION
#undef GEN_PASS_DECL_SHAPESIMPLIFICATION
#endif // GEN_PASS_DECL_SHAPESIMPLIFICATION
#ifdef GEN_PASS_DEF_SHAPESIMPLIFICATION
namespace impl {

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

  ShapeSimplificationBase() : ::mlir::OperationPass<mlir::func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  ShapeSimplificationBase(const ShapeSimplificationBase &other) : ::mlir::OperationPass<mlir::func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Simplify shape ops"; }

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

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

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

//===----------------------------------------------------------------------===//
// SinkConstantsToControlFlowPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SINKCONSTANTSTOCONTROLFLOWPASS
#undef GEN_PASS_DECL_SINKCONSTANTSTOCONTROLFLOWPASS
#endif // GEN_PASS_DECL_SINKCONSTANTSTOCONTROLFLOWPASS
#ifdef GEN_PASS_DEF_SINKCONSTANTSTOCONTROLFLOWPASS
namespace impl {

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

  SinkConstantsToControlFlowPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  SinkConstantsToControlFlowPassBase(const SinkConstantsToControlFlowPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Sink constants implicitly captured in control flow regions. This is necessary to export to XLA."; }

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

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

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

//===----------------------------------------------------------------------===//
// SparseRewritingPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SPARSEREWRITINGPASS
#undef GEN_PASS_DECL_SPARSEREWRITINGPASS
#endif // GEN_PASS_DECL_SPARSEREWRITINGPASS
#ifdef GEN_PASS_DEF_SPARSEREWRITINGPASS
namespace impl {

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

  SparseRewritingPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  SparseRewritingPassBase(const SparseRewritingPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Pass to rewrite mhlo sparse tensor types."; }

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

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

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

//===----------------------------------------------------------------------===//
// StablehloLegalizeToHloPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_STABLEHLOLEGALIZETOHLOPASS
#undef GEN_PASS_DECL_STABLEHLOLEGALIZETOHLOPASS
#endif // GEN_PASS_DECL_STABLEHLOLEGALIZETOHLOPASS
#ifdef GEN_PASS_DEF_STABLEHLOLEGALIZETOHLOPASS
namespace impl {

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

  StablehloLegalizeToHloPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  StablehloLegalizeToHloPassBase(const StablehloLegalizeToHloPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize StableHLO to HLO."; }

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

  /// 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<mhlo::MhloDialect>();

  }

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

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

//===----------------------------------------------------------------------===//
// SymbolicShapeOptimization
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SYMBOLICSHAPEOPTIMIZATION
#undef GEN_PASS_DECL_SYMBOLICSHAPEOPTIMIZATION
#endif // GEN_PASS_DECL_SYMBOLICSHAPEOPTIMIZATION
#ifdef GEN_PASS_DEF_SYMBOLICSHAPEOPTIMIZATION
namespace impl {

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

  SymbolicShapeOptimizationBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  SymbolicShapeOptimizationBase(const SymbolicShapeOptimizationBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Analyzes shapes and performs shape-related optimizations"; }

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

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

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

//===----------------------------------------------------------------------===//
// TestInferShapedTypeMethodsPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_TESTINFERSHAPEDTYPEMETHODSPASS
#undef GEN_PASS_DECL_TESTINFERSHAPEDTYPEMETHODSPASS
#endif // GEN_PASS_DECL_TESTINFERSHAPEDTYPEMETHODSPASS
#ifdef GEN_PASS_DEF_TESTINFERSHAPEDTYPEMETHODSPASS
namespace impl {

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

  TestInferShapedTypeMethodsPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  TestInferShapedTypeMethodsPassBase(const TestInferShapedTypeMethodsPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("mhlo-test-infer-shaped-type-methods");
  }
  ::llvm::StringRef getArgument() const override { return "mhlo-test-infer-shaped-type-methods"; }

  ::llvm::StringRef getDescription() const override { return "Uses test ops to invoke InferShapedTypeOpInterface methods."; }

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

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

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

//===----------------------------------------------------------------------===//
// TestMaterializeBroadcastsPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_TESTMATERIALIZEBROADCASTSPASS
#undef GEN_PASS_DECL_TESTMATERIALIZEBROADCASTSPASS
#endif // GEN_PASS_DECL_TESTMATERIALIZEBROADCASTSPASS
#ifdef GEN_PASS_DEF_TESTMATERIALIZEBROADCASTSPASS
namespace impl {

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

  TestMaterializeBroadcastsPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  TestMaterializeBroadcastsPassBase(const TestMaterializeBroadcastsPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Test pass for materializing 'broadcast_dimensions' attributes."; }

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

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

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

//===----------------------------------------------------------------------===//
// TestUnfuseBatchNormPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_TESTUNFUSEBATCHNORMPASS
#undef GEN_PASS_DECL_TESTUNFUSEBATCHNORMPASS
#endif // GEN_PASS_DECL_TESTUNFUSEBATCHNORMPASS
#ifdef GEN_PASS_DEF_TESTUNFUSEBATCHNORMPASS
namespace impl {

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

  TestUnfuseBatchNormPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  TestUnfuseBatchNormPassBase(const TestUnfuseBatchNormPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Test pass for materializing 'broadcast_dimensions' attributes."; }

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

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

  registry.insert<shape::ShapeDialect>();

  registry.insert<tensor::TensorDialect>();

  }

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

protected:
private:
};
} // namespace impl
#undef GEN_PASS_DEF_TESTUNFUSEBATCHNORMPASS
#endif // GEN_PASS_DEF_TESTUNFUSEBATCHNORMPASS
#ifdef GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// BroadcastPropagationPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// ChloLegalizeToHloPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// ChloLegalizeToLinalgPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// CollapseElementwiseMapPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// ConstraintFusionPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// ConvertToSignlessPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// ExpandHloTuplesPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// FlattenTuplePass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// GroupReductionDimensionsPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// HloCanonicalizeGatherPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// HloCanonicalizeReductionPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// HloCanonicalizeScatterPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeShapeComputationsPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeShapeOpsToStandardPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeSortPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeToArithmeticPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeToLhloPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeToLinalgPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeToMemrefPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// HloLegalizeToStablehloPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// LegalizeControlFlowPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// LegalizeEinsumToDotGeneralPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// LegalizeGatherToTorchIndexSelectPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// LegalizeGeneralDotPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// LegalizeMHLOToTHLOPass Registration
//===----------------------------------------------------------------------===//

inline void registerLegalizeMHLOToTHLOPass() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return ::mlir::mhlo::createLegalizeMHLOToTHLOPass();
  });
}

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

//===----------------------------------------------------------------------===//
// LegalizeTanhToApproximationPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// LegalizeToStandardPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// LowerComplexPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// MergeAssumingOpsPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// MhloExpandOpsSimplifierPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// OptimizeMhloPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// PrepareForExportPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// RankSpecializationClusterPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// RankSpecializationToSCFPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// RestrictMaxRankPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// ShapeReificationPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// ShapeSimplification Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// SinkConstantsToControlFlowPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// SparseRewritingPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// StablehloLegalizeToHloPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// SymbolicShapeOptimization Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// TestInferShapedTypeMethodsPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// TestMaterializeBroadcastsPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// TestUnfuseBatchNormPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// AllMhlo Registration
//===----------------------------------------------------------------------===//

inline void registerAllMhloPasses() {
  registerBroadcastPropagationPass();
  registerChloLegalizeToHloPass();
  registerChloLegalizeToLinalgPass();
  registerCollapseElementwiseMapPass();
  registerConstraintFusionPass();
  registerConvertToSignlessPass();
  registerExpandHloTuplesPass();
  registerFlattenTuplePass();
  registerGroupReductionDimensionsPass();
  registerHloCanonicalizeGatherPass();
  registerHloCanonicalizeReductionPass();
  registerHloCanonicalizeScatterPass();
  registerHloLegalizeShapeComputationsPass();
  registerHloLegalizeShapeOpsToStandardPass();
  registerHloLegalizeSortPass();
  registerHloLegalizeToArithmeticPass();
  registerHloLegalizeToLhloPass();
  registerHloLegalizeToLinalgPass();
  registerHloLegalizeToMemrefPass();
  registerHloLegalizeToStablehloPass();
  registerLegalizeControlFlowPass();
  registerLegalizeEinsumToDotGeneralPass();
  registerLegalizeGatherToTorchIndexSelectPass();
  registerLegalizeGeneralDotPass();
  registerLegalizeMHLOToTHLOPass();
  registerLegalizeTanhToApproximationPass();
  registerLegalizeToStandardPass();
  registerLowerComplexPass();
  registerMergeAssumingOpsPass();
  registerMhloExpandOpsSimplifierPass();
  registerOptimizeMhloPass();
  registerPrepareForExportPass();
  registerRankSpecializationClusterPass();
  registerRankSpecializationToSCFPass();
  registerRestrictMaxRankPass();
  registerShapeReificationPass();
  registerShapeSimplification();
  registerSinkConstantsToControlFlowPass();
  registerSparseRewritingPass();
  registerStablehloLegalizeToHloPass();
  registerSymbolicShapeOptimization();
  registerTestInferShapedTypeMethodsPass();
  registerTestMaterializeBroadcastsPass();
  registerTestUnfuseBatchNormPass();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
// Deprecated. Please use the new per-pass macros.
#ifdef GEN_PASS_CLASSES

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

  BroadcastPropagationPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  BroadcastPropagationPassBase(const BroadcastPropagationPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Move dynamic broadcasts up over element-wise operations and broadcast the operands rather than the result. This will eventually allow for larger fusions."; }

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

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

protected:
};

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

  ChloLegalizeToHloPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  ChloLegalizeToHloPassBase(const ChloLegalizeToHloPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize CHLO to HLO."; }

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

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

protected:
  ::mlir::Pass::Option<bool> legalize_broadcasts_{*this, "legalize-broadcasts", ::llvm::cl::desc("Legalize implicit broadcasts to explicit HLO broadcasting forms"), ::llvm::cl::init(true)};
  ::mlir::Pass::Option<bool> expand_compositions_{*this, "expand-compositions", ::llvm::cl::desc("Expands client-centric compositions to HLO primitives"), ::llvm::cl::init(true)};
};

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

  ChloLegalizeToLinalgPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  ChloLegalizeToLinalgPassBase(const ChloLegalizeToLinalgPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from sparse ops in CHLO dialect to Linalg dialect."; }

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

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

protected:
};

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

  CollapseElementwiseMapPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  CollapseElementwiseMapPassBase(const CollapseElementwiseMapPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Collapse the mhlo.map if the map only has elementwise ops."; }

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

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

protected:
};

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

  ConstraintFusionPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  ConstraintFusionPassBase(const ConstraintFusionPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Fuse shape constraints and merge all assuming regions."; }

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

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

protected:
};

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

  ConvertToSignlessPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  ConvertToSignlessPassBase(const ConvertToSignlessPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Pass to transform the IR to be on signless integers."; }

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

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

protected:
};

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

  ExpandHloTuplesPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  ExpandHloTuplesPassBase(const ExpandHloTuplesPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Expand HLO tuple for the entry function of the module."; }

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

  /// 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<mhlo::MhloDialect>();

  }

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

protected:
  ::mlir::Pass::Option<std::string> entry_function_name_{*this, "entry-function", ::llvm::cl::desc("the name of entry function of the module")};
};

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

  FlattenTuplePassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  FlattenTuplePassBase(const FlattenTuplePassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Flatten tuples in operands and results of operators that support both tuple and variadic type."; }

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

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

protected:
};

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

  GroupReductionDimensionsPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  GroupReductionDimensionsPassBase(const GroupReductionDimensionsPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Group dimensions of reduction operations"; }

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

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

protected:
  ::mlir::Pass::Option<bool> prefer_columns_reductions_{*this, "prefer-columns-reductions", ::llvm::cl::desc("When simplifying reductions, prefer to use column reductions over row reductions."), ::llvm::cl::init(true)};
};

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

  HloCanonicalizeGatherPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloCanonicalizeGatherPassBase(const HloCanonicalizeGatherPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Rewrites gather into transposes, reshapes and a simple gather."; }

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

  /// 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<mhlo::MhloDialect>();

  registry.insert<tensor::TensorDialect>();

  }

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

protected:
};

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

  HloCanonicalizeReductionPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloCanonicalizeReductionPassBase(const HloCanonicalizeReductionPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Canonicalize reduction ops to be suitable for codegen."; }

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

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

protected:
};

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

  HloCanonicalizeScatterPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloCanonicalizeScatterPassBase(const HloCanonicalizeScatterPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Rewrites scatter into transposes, reshapes and a simple scatter."; }

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

  /// 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<mhlo::MhloDialect>();

  registry.insert<tensor::TensorDialect>();

  }

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

protected:
};

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

  HloLegalizeShapeComputationsPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeShapeComputationsPassBase(const HloLegalizeShapeComputationsPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize HLOs shape operations to core-mlir operations."; }

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

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

protected:
};

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

  HloLegalizeShapeOpsToStandardPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeShapeOpsToStandardPassBase(const HloLegalizeShapeOpsToStandardPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize shape operations from HLO dialect to standard dialect."; }

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

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

protected:
};

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

  HloLegalizeSortPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeSortPassBase(const HloLegalizeSortPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from MHLO sort to SCF control flow."; }

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

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

  registry.insert<bufferization::BufferizationDialect>();

  registry.insert<scf::SCFDialect>();

  registry.insert<tensor::TensorDialect>();

  }

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

protected:
};

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

  HloLegalizeToArithmeticPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeToArithmeticPassBase(const HloLegalizeToArithmeticPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from HLO dialect to arithmetic dialect."; }

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

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

protected:
};

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

  HloLegalizeToLhloPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeToLhloPassBase(const HloLegalizeToLhloPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from HLO dialect to LHLO dialect."; }

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

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

protected:
};

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

  HloLegalizeToLinalgPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeToLinalgPassBase(const HloLegalizeToLinalgPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from HLO dialect to Linalg dialect."; }

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

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

protected:
  ::mlir::Pass::Option<bool> enablePrimitiveOps{*this, "enable-primitive-ops", ::llvm::cl::desc("Lower to primitive Linalg ops (map, reduce and transpose) when possible, instead of linalg.generic"), ::llvm::cl::init(false)};
};

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

  HloLegalizeToMemrefPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeToMemrefPassBase(const HloLegalizeToMemrefPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from HLO dialect to memref dialect."; }

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

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

protected:
};

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

  HloLegalizeToStablehloPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  HloLegalizeToStablehloPassBase(const HloLegalizeToStablehloPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize HLO to StableHLO."; }

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

  /// 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<stablehlo::StablehloDialect>();

  }

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

protected:
  ::mlir::Pass::Option<bool> allow_experimental_features_{*this, "allow-experimental-features", ::llvm::cl::desc("Allow legalization of experimental MHLO features via StableHLO custom_call"), ::llvm::cl::init(false)};
};

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

  LegalizeControlFlowPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeControlFlowPassBase(const LegalizeControlFlowPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from MHLO control flow to SCF control flow."; }

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

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

  registry.insert<tensor::TensorDialect>();

  }

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

protected:
};

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

  LegalizeEinsumToDotGeneralPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeEinsumToDotGeneralPassBase(const LegalizeEinsumToDotGeneralPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalizes einsum ops to dot_general ops."; }

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

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

protected:
};

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

  LegalizeGatherToTorchIndexSelectPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeGatherToTorchIndexSelectPassBase(const LegalizeGatherToTorchIndexSelectPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalizes gathers to a torch index select."; }

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

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

protected:
};

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

  LegalizeGeneralDotPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeGeneralDotPassBase(const LegalizeGeneralDotPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Tests lowering general dot to a non-batched dot when possible."; }

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

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

protected:
};

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

  LegalizeMHLOToTHLOPassBase() : ::mlir::OperationPass<mlir::func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeMHLOToTHLOPassBase(const LegalizeMHLOToTHLOPassBase &other) : ::mlir::OperationPass<mlir::func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from HLO dialect to tHLO dialect."; }

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

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

  registry.insert<complex::ComplexDialect>();

  registry.insert<linalg::LinalgDialect>();

  registry.insert<math::MathDialect>();

  registry.insert<shape::ShapeDialect>();

  registry.insert<tensor::TensorDialect>();

  registry.insert<thlo::THLODialect>();

  }

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

protected:
  ::mlir::Pass::Option<bool> enableExperimental{*this, "enable-experimental", ::llvm::cl::desc("Enable conversion to operations that are still under developement and might not be working in some pipelines. For example, thlo.map and thlo.transpose."), ::llvm::cl::init(false)};
};

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

  LegalizeTanhToApproximationPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeTanhToApproximationPassBase(const LegalizeTanhToApproximationPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize trigonometric operations from standard dialect to an approximation."; }

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

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

protected:
};

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

  LegalizeToStandardPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeToStandardPassBase(const LegalizeToStandardPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize from MHLO dialect to standard dialect."; }

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

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

protected:
};

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

  LowerComplexPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LowerComplexPassBase(const LowerComplexPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Lower complex operations into non-complex operations."; }

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

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

protected:
};

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

  MergeAssumingOpsPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  MergeAssumingOpsPassBase(const MergeAssumingOpsPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Prepare moving dynamic broadcasts up over element-wise operations and broadcast the operands rather than the result. This will eventually allow for larger fusions."; }

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

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

protected:
};

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

  MhloExpandOpsSimplifierPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  MhloExpandOpsSimplifierPassBase(const MhloExpandOpsSimplifierPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Expand feature rich mhlo ops into a set of simpler mhlo ops."; }

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

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

protected:
};

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

  OptimizeMhloPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  OptimizeMhloPassBase(const OptimizeMhloPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Run optional HLO optimizations."; }

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

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

protected:
};

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

  PrepareForExportPassBase() : ::mlir::OperationPass<mlir::func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  PrepareForExportPassBase(const PrepareForExportPassBase &other) : ::mlir::OperationPass<mlir::func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Prepare for XLA export"; }

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

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

protected:
};

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

  RankSpecializationClusterPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  RankSpecializationClusterPassBase(const RankSpecializationClusterPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

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

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

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

protected:
};

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

  RankSpecializationToSCFPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  RankSpecializationToSCFPassBase(const RankSpecializationToSCFPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

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

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

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

protected:
  ::mlir::Pass::Option<int> max_target_rank_{*this, "max-target-rank", ::llvm::cl::desc("The maximum supported rank after rank specialization. Any argument of greater rank may result in a runtime failure."), ::llvm::cl::init(8)};
};

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

  RestrictMaxRankPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  RestrictMaxRankPassBase(const RestrictMaxRankPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Restrict maximum rank of any of the intermediate tensors"; }

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

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

protected:
};

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

  ShapeReificationPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  ShapeReificationPassBase(const ShapeReificationPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Iteratively reify all shape computations."; }

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

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

protected:
};

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

  ShapeSimplificationBase() : ::mlir::OperationPass<mlir::func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  ShapeSimplificationBase(const ShapeSimplificationBase &other) : ::mlir::OperationPass<mlir::func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Simplify shape ops"; }

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

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

protected:
};

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

  SinkConstantsToControlFlowPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  SinkConstantsToControlFlowPassBase(const SinkConstantsToControlFlowPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Sink constants implicitly captured in control flow regions. This is necessary to export to XLA."; }

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

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

protected:
};

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

  SparseRewritingPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  SparseRewritingPassBase(const SparseRewritingPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Pass to rewrite mhlo sparse tensor types."; }

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

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

protected:
};

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

  StablehloLegalizeToHloPassBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  StablehloLegalizeToHloPassBase(const StablehloLegalizeToHloPassBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Legalize StableHLO to HLO."; }

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

  /// 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<mhlo::MhloDialect>();

  }

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

protected:
};

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

  SymbolicShapeOptimizationBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  SymbolicShapeOptimizationBase(const SymbolicShapeOptimizationBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Analyzes shapes and performs shape-related optimizations"; }

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

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

protected:
};

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

  TestInferShapedTypeMethodsPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  TestInferShapedTypeMethodsPassBase(const TestInferShapedTypeMethodsPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("mhlo-test-infer-shaped-type-methods");
  }
  ::llvm::StringRef getArgument() const override { return "mhlo-test-infer-shaped-type-methods"; }

  ::llvm::StringRef getDescription() const override { return "Uses test ops to invoke InferShapedTypeOpInterface methods."; }

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

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

protected:
};

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

  TestMaterializeBroadcastsPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  TestMaterializeBroadcastsPassBase(const TestMaterializeBroadcastsPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Test pass for materializing 'broadcast_dimensions' attributes."; }

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

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

protected:
};

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

  TestUnfuseBatchNormPassBase() : ::mlir::OperationPass<func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  TestUnfuseBatchNormPassBase(const TestUnfuseBatchNormPassBase &other) : ::mlir::OperationPass<func::FuncOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Test pass for materializing 'broadcast_dimensions' attributes."; }

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

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

  registry.insert<shape::ShapeDialect>();

  registry.insert<tensor::TensorDialect>();

  }

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

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