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

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_CHLOPRESERVEHIGHLEVELOPSPASS
#define GEN_PASS_DECL_CHLORECOMPOSEOPSPASS
#define GEN_PASS_DECL_SINKCONSTANTSTOCONTROLFLOWPASS
#define GEN_PASS_DECL_STABLEHLOADDQDQAFTERCONVPASS
#define GEN_PASS_DECL_STABLEHLOCANONICALIZEDYNAMISMPASS
#define GEN_PASS_DECL_STABLEHLOCANONICALIZEFROMHLOIMPORTPASS
#define GEN_PASS_DECL_STABLEHLOLEGALIZEQUANTCOMPOSITEPASS
#define GEN_PASS_DECL_STABLEHLOPREPAREFORHLOEXPORTPASS
#define GEN_PASS_DECL_STABLEHLOREFINESHAPESPASS
#define GEN_PASS_DECL_STABLEHLOSANITIZEDISCARDABLEATTRIBUTESPASS
#define GEN_PASS_DECL_SYMBOLICSHAPEOPTIMIZATIONPASS
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// ChloPreserveHighLevelOpsPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CHLOPRESERVEHIGHLEVELOPSPASS
struct ChloPreserveHighLevelOpsPassOptions {
  bool useDeprecatedCustomCallEncoding = true;
};
std::unique_ptr<::mlir::Pass> createChloPreserveHighLevelOpsPass();
std::unique_ptr<::mlir::Pass> createChloPreserveHighLevelOpsPass(ChloPreserveHighLevelOpsPassOptions options);
#undef GEN_PASS_DECL_CHLOPRESERVEHIGHLEVELOPSPASS
#endif // GEN_PASS_DECL_CHLOPRESERVEHIGHLEVELOPSPASS
#ifdef GEN_PASS_DEF_CHLOPRESERVEHIGHLEVELOPSPASS

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

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

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

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

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("stablehlo-ext-chlo-preserve-high-level-ops");
  }
  ::llvm::StringRef getArgument() const override { return "stablehlo-ext-chlo-preserve-high-level-ops"; }

  ::llvm::StringRef getDescription() const override { return R"PD((Experimental) Preserve select CHLO ops as composites.)PD"; }

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

  /// 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>();
    registry.insert<chlo::ChloDialect>();
  }

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

  ChloPreserveHighLevelOpsPassBase(ChloPreserveHighLevelOpsPassOptions options) : ChloPreserveHighLevelOpsPassBase() {
    useDeprecatedCustomCallEncoding = std::move(options.useDeprecatedCustomCallEncoding);
  }
protected:
  ::mlir::Pass::Option<bool> useDeprecatedCustomCallEncoding{*this, "use-custom-call-encoding", ::llvm::cl::desc(R"PO(Use the deprecated custom call encoding for TopK, to be removed for composites after 12w.)PO"), ::llvm::cl::init(true)};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createChloPreserveHighLevelOpsPass(ChloPreserveHighLevelOpsPassOptions options) {
  return impl::createChloPreserveHighLevelOpsPass(std::move(options));
}
#undef GEN_PASS_DEF_CHLOPRESERVEHIGHLEVELOPSPASS
#endif // GEN_PASS_DEF_CHLOPRESERVEHIGHLEVELOPSPASS

//===----------------------------------------------------------------------===//
// ChloRecomposeOpsPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_CHLORECOMPOSEOPSPASS
std::unique_ptr<::mlir::Pass> createChloRecomposeOpsPass();
#undef GEN_PASS_DECL_CHLORECOMPOSEOPSPASS
#endif // GEN_PASS_DECL_CHLORECOMPOSEOPSPASS
#ifdef GEN_PASS_DEF_CHLORECOMPOSEOPSPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD((Experimental) Recompose CHLO ops serialized as custom calls and composites.)PD"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// SinkConstantsToControlFlowPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SINKCONSTANTSTOCONTROLFLOWPASS
std::unique_ptr<::mlir::Pass> createSinkConstantsToControlFlowPass();
#undef GEN_PASS_DECL_SINKCONSTANTSTOCONTROLFLOWPASS
#endif // GEN_PASS_DECL_SINKCONSTANTSTOCONTROLFLOWPASS
#ifdef GEN_PASS_DEF_SINKCONSTANTSTOCONTROLFLOWPASS

namespace impl {
  std::unique_ptr<::mlir::Pass> createSinkConstantsToControlFlowPass();
} // namespace impl
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) {}
  SinkConstantsToControlFlowPassBase& operator=(const SinkConstantsToControlFlowPassBase &) = delete;
  SinkConstantsToControlFlowPassBase(SinkConstantsToControlFlowPassBase &&) = delete;
  SinkConstantsToControlFlowPassBase& operator=(SinkConstantsToControlFlowPassBase &&) = delete;
  ~SinkConstantsToControlFlowPassBase() = default;

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

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

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

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

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

//===----------------------------------------------------------------------===//
// StablehloAddQDQAfterConvPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_STABLEHLOADDQDQAFTERCONVPASS
std::unique_ptr<::mlir::Pass> createStablehloAddQDQAfterConvPass();
#undef GEN_PASS_DECL_STABLEHLOADDQDQAFTERCONVPASS
#endif // GEN_PASS_DECL_STABLEHLOADDQDQAFTERCONVPASS
#ifdef GEN_PASS_DEF_STABLEHLOADDQDQAFTERCONVPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Add quant and dequant ops after convolution op.)PD"; }

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

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// StablehloCanonicalizeDynamismPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_STABLEHLOCANONICALIZEDYNAMISMPASS
std::unique_ptr<::mlir::Pass> createStablehloCanonicalizeDynamismPass();
#undef GEN_PASS_DECL_STABLEHLOCANONICALIZEDYNAMISMPASS
#endif // GEN_PASS_DECL_STABLEHLOCANONICALIZEDYNAMISMPASS
#ifdef GEN_PASS_DEF_STABLEHLOCANONICALIZEDYNAMISMPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Canonicalizes dynamic StableHLO ops into static ops, with some XLA specialization.)PD"; }

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

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

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// StablehloCanonicalizeFromHloImportPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_STABLEHLOCANONICALIZEFROMHLOIMPORTPASS
struct StablehloCanonicalizeFromHloImportPassOptions {
  std::string entryFunctionNameOption = "main";
};
std::unique_ptr<::mlir::Pass> createStablehloCanonicalizeFromHloImportPass();
std::unique_ptr<::mlir::Pass> createStablehloCanonicalizeFromHloImportPass(StablehloCanonicalizeFromHloImportPassOptions options);
#undef GEN_PASS_DECL_STABLEHLOCANONICALIZEFROMHLOIMPORTPASS
#endif // GEN_PASS_DECL_STABLEHLOCANONICALIZEFROMHLOIMPORTPASS
#ifdef GEN_PASS_DEF_STABLEHLOCANONICALIZEFROMHLOIMPORTPASS

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Simplify StableHLO imported from HLO)PD"; }

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

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

  StablehloCanonicalizeFromHloImportPassBase(StablehloCanonicalizeFromHloImportPassOptions options) : StablehloCanonicalizeFromHloImportPassBase() {
    entryFunctionNameOption = std::move(options.entryFunctionNameOption);
  }
protected:
  ::mlir::Pass::Option<std::string> entryFunctionNameOption{*this, "entry-function", ::llvm::cl::desc(R"PO(the name of entry function of the module)PO"), ::llvm::cl::init("main")};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createStablehloCanonicalizeFromHloImportPass(StablehloCanonicalizeFromHloImportPassOptions options) {
  return impl::createStablehloCanonicalizeFromHloImportPass(std::move(options));
}
#undef GEN_PASS_DEF_STABLEHLOCANONICALIZEFROMHLOIMPORTPASS
#endif // GEN_PASS_DEF_STABLEHLOCANONICALIZEFROMHLOIMPORTPASS

//===----------------------------------------------------------------------===//
// StablehloLegalizeQuantCompositePass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_STABLEHLOLEGALIZEQUANTCOMPOSITEPASS
std::unique_ptr<::mlir::Pass> createStablehloLegalizeQuantCompositePass();
#undef GEN_PASS_DECL_STABLEHLOLEGALIZEQUANTCOMPOSITEPASS
#endif // GEN_PASS_DECL_STABLEHLOLEGALIZEQUANTCOMPOSITEPASS
#ifdef GEN_PASS_DEF_STABLEHLOLEGALIZEQUANTCOMPOSITEPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Lowers the quantization related composites op to native quantized ops.)PD"; }

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

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// StablehloPrepareForHloExportPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_STABLEHLOPREPAREFORHLOEXPORTPASS
std::unique_ptr<::mlir::Pass> createStablehloPrepareForHloExportPass();
#undef GEN_PASS_DECL_STABLEHLOPREPAREFORHLOEXPORTPASS
#endif // GEN_PASS_DECL_STABLEHLOPREPAREFORHLOEXPORTPASS
#ifdef GEN_PASS_DEF_STABLEHLOPREPAREFORHLOEXPORTPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Prepare StableHLO for HLO export)PD"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// StablehloRefineShapesPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_STABLEHLOREFINESHAPESPASS
std::unique_ptr<::mlir::Pass> createStablehloRefineShapesPass();
#undef GEN_PASS_DECL_STABLEHLOREFINESHAPESPASS
#endif // GEN_PASS_DECL_STABLEHLOREFINESHAPESPASS
#ifdef GEN_PASS_DEF_STABLEHLOREFINESHAPESPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Refines shapes across a StableHLO program, with some XLA specialization.)PD"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// StablehloSanitizeDiscardableAttributesPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_STABLEHLOSANITIZEDISCARDABLEATTRIBUTESPASS
std::unique_ptr<::mlir::Pass> createStablehloSanitizeDiscardableAttributesPass();
#undef GEN_PASS_DECL_STABLEHLOSANITIZEDISCARDABLEATTRIBUTESPASS
#endif // GEN_PASS_DECL_STABLEHLOSANITIZEDISCARDABLEATTRIBUTESPASS
#ifdef GEN_PASS_DEF_STABLEHLOSANITIZEDISCARDABLEATTRIBUTESPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Removes discardable attributes that are unrecognized in XLA)PD"; }

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// SymbolicShapeOptimizationPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SYMBOLICSHAPEOPTIMIZATIONPASS
std::unique_ptr<::mlir::Pass> createSymbolicShapeOptimizationPass();
#undef GEN_PASS_DECL_SYMBOLICSHAPEOPTIMIZATIONPASS
#endif // GEN_PASS_DECL_SYMBOLICSHAPEOPTIMIZATIONPASS
#ifdef GEN_PASS_DEF_SYMBOLICSHAPEOPTIMIZATIONPASS

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

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

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

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

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

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

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

protected:
private:

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

std::unique_ptr<::mlir::Pass> createSymbolicShapeOptimizationPass() {
  return impl::createSymbolicShapeOptimizationPass();
}
#undef GEN_PASS_DEF_SYMBOLICSHAPEOPTIMIZATIONPASS
#endif // GEN_PASS_DEF_SYMBOLICSHAPEOPTIMIZATIONPASS
#ifdef GEN_PASS_REGISTRATION
// Generate registrations for all passes.
#define GEN_PASS_REGISTRATION_CHLOPRESERVEHIGHLEVELOPSPASS
#define GEN_PASS_REGISTRATION_CHLORECOMPOSEOPSPASS
#define GEN_PASS_REGISTRATION_SINKCONSTANTSTOCONTROLFLOWPASS
#define GEN_PASS_REGISTRATION_STABLEHLOADDQDQAFTERCONVPASS
#define GEN_PASS_REGISTRATION_STABLEHLOCANONICALIZEDYNAMISMPASS
#define GEN_PASS_REGISTRATION_STABLEHLOCANONICALIZEFROMHLOIMPORTPASS
#define GEN_PASS_REGISTRATION_STABLEHLOLEGALIZEQUANTCOMPOSITEPASS
#define GEN_PASS_REGISTRATION_STABLEHLOPREPAREFORHLOEXPORTPASS
#define GEN_PASS_REGISTRATION_STABLEHLOREFINESHAPESPASS
#define GEN_PASS_REGISTRATION_STABLEHLOSANITIZEDISCARDABLEATTRIBUTESPASS
#define GEN_PASS_REGISTRATION_SYMBOLICSHAPEOPTIMIZATIONPASS
#endif // GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// ChloPreserveHighLevelOpsPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CHLOPRESERVEHIGHLEVELOPSPASS

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

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

#undef GEN_PASS_REGISTRATION_CHLOPRESERVEHIGHLEVELOPSPASS
#endif // GEN_PASS_REGISTRATION_CHLOPRESERVEHIGHLEVELOPSPASS

//===----------------------------------------------------------------------===//
// ChloRecomposeOpsPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_CHLORECOMPOSEOPSPASS

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

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

#undef GEN_PASS_REGISTRATION_CHLORECOMPOSEOPSPASS
#endif // GEN_PASS_REGISTRATION_CHLORECOMPOSEOPSPASS

//===----------------------------------------------------------------------===//
// SinkConstantsToControlFlowPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_SINKCONSTANTSTOCONTROLFLOWPASS

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

#undef GEN_PASS_REGISTRATION_SINKCONSTANTSTOCONTROLFLOWPASS
#endif // GEN_PASS_REGISTRATION_SINKCONSTANTSTOCONTROLFLOWPASS

//===----------------------------------------------------------------------===//
// StablehloAddQDQAfterConvPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_STABLEHLOADDQDQAFTERCONVPASS

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

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

#undef GEN_PASS_REGISTRATION_STABLEHLOADDQDQAFTERCONVPASS
#endif // GEN_PASS_REGISTRATION_STABLEHLOADDQDQAFTERCONVPASS

//===----------------------------------------------------------------------===//
// StablehloCanonicalizeDynamismPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_STABLEHLOCANONICALIZEDYNAMISMPASS

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

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

#undef GEN_PASS_REGISTRATION_STABLEHLOCANONICALIZEDYNAMISMPASS
#endif // GEN_PASS_REGISTRATION_STABLEHLOCANONICALIZEDYNAMISMPASS

//===----------------------------------------------------------------------===//
// StablehloCanonicalizeFromHloImportPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_STABLEHLOCANONICALIZEFROMHLOIMPORTPASS

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

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

#undef GEN_PASS_REGISTRATION_STABLEHLOCANONICALIZEFROMHLOIMPORTPASS
#endif // GEN_PASS_REGISTRATION_STABLEHLOCANONICALIZEFROMHLOIMPORTPASS

//===----------------------------------------------------------------------===//
// StablehloLegalizeQuantCompositePass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_STABLEHLOLEGALIZEQUANTCOMPOSITEPASS

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

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

#undef GEN_PASS_REGISTRATION_STABLEHLOLEGALIZEQUANTCOMPOSITEPASS
#endif // GEN_PASS_REGISTRATION_STABLEHLOLEGALIZEQUANTCOMPOSITEPASS

//===----------------------------------------------------------------------===//
// StablehloPrepareForHloExportPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_STABLEHLOPREPAREFORHLOEXPORTPASS

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

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

#undef GEN_PASS_REGISTRATION_STABLEHLOPREPAREFORHLOEXPORTPASS
#endif // GEN_PASS_REGISTRATION_STABLEHLOPREPAREFORHLOEXPORTPASS

//===----------------------------------------------------------------------===//
// StablehloRefineShapesPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_STABLEHLOREFINESHAPESPASS

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

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

#undef GEN_PASS_REGISTRATION_STABLEHLOREFINESHAPESPASS
#endif // GEN_PASS_REGISTRATION_STABLEHLOREFINESHAPESPASS

//===----------------------------------------------------------------------===//
// StablehloSanitizeDiscardableAttributesPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_STABLEHLOSANITIZEDISCARDABLEATTRIBUTESPASS

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

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

#undef GEN_PASS_REGISTRATION_STABLEHLOSANITIZEDISCARDABLEATTRIBUTESPASS
#endif // GEN_PASS_REGISTRATION_STABLEHLOSANITIZEDISCARDABLEATTRIBUTESPASS

//===----------------------------------------------------------------------===//
// SymbolicShapeOptimizationPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_SYMBOLICSHAPEOPTIMIZATIONPASS

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

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

#undef GEN_PASS_REGISTRATION_SYMBOLICSHAPEOPTIMIZATIONPASS
#endif // GEN_PASS_REGISTRATION_SYMBOLICSHAPEOPTIMIZATIONPASS
#ifdef GEN_PASS_REGISTRATION

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

inline void registerPasses() {
  registerChloPreserveHighLevelOpsPass();
  registerChloRecomposeOpsPass();
  registerSinkConstantsToControlFlowPass();
  registerStablehloAddQDQAfterConvPass();
  registerStablehloCanonicalizeDynamismPass();
  registerStablehloCanonicalizeFromHloImportPass();
  registerStablehloLegalizeQuantCompositePass();
  registerStablehloPrepareForHloExportPass();
  registerStablehloRefineShapesPass();
  registerStablehloSanitizeDiscardableAttributesPass();
  registerSymbolicShapeOptimizationPass();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
#ifdef GEN_PASS_CLASSES
#error "GEN_PASS_CLASSES is deprecated; use per-pass macros"
#undef GEN_PASS_CLASSES
#endif // GEN_PASS_CLASSES
