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

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_MATHEXPANDOPSPASS
#define GEN_PASS_DECL_MATHEXTENDTOSUPPORTEDTYPES
#define GEN_PASS_DECL_MATHSINCOSFUSIONPASS
#define GEN_PASS_DECL_MATHUPLIFTTOFMA
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// MathExpandOpsPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MATHEXPANDOPSPASS
struct MathExpandOpsPassOptions {
  ::llvm::SmallVector<std::string> opMnemonics;
};
std::unique_ptr<::mlir::Pass> createMathExpandOpsPass();
std::unique_ptr<::mlir::Pass> createMathExpandOpsPass(MathExpandOpsPassOptions options);
#undef GEN_PASS_DECL_MATHEXPANDOPSPASS
#endif // GEN_PASS_DECL_MATHEXPANDOPSPASS
#ifdef GEN_PASS_DEF_MATHEXPANDOPSPASS

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Expand math operations.)PD"; }

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

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

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

  MathExpandOpsPassBase(MathExpandOpsPassOptions options) : MathExpandOpsPassBase() {
    opMnemonics = std::move(options.opMnemonics);
  }
protected:
  ::mlir::Pass::ListOption<std::string> opMnemonics{*this, "ops", ::llvm::cl::desc(R"PO(Operations to expand.)PO")};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createMathExpandOpsPass(MathExpandOpsPassOptions options) {
  return impl::createMathExpandOpsPass(std::move(options));
}
#undef GEN_PASS_DEF_MATHEXPANDOPSPASS
#endif // GEN_PASS_DEF_MATHEXPANDOPSPASS

//===----------------------------------------------------------------------===//
// MathExtendToSupportedTypes
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MATHEXTENDTOSUPPORTEDTYPES
struct MathExtendToSupportedTypesOptions {
  ::llvm::SmallVector<std::string> extraTypeStrs;
  std::string targetTypeStr = "f32";
};
std::unique_ptr<::mlir::Pass> createMathExtendToSupportedTypes();
std::unique_ptr<::mlir::Pass> createMathExtendToSupportedTypes(MathExtendToSupportedTypesOptions options);
#undef GEN_PASS_DECL_MATHEXTENDTOSUPPORTEDTYPES
#endif // GEN_PASS_DECL_MATHEXTENDTOSUPPORTEDTYPES
#ifdef GEN_PASS_DEF_MATHEXTENDTOSUPPORTEDTYPES

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

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Legalize floating-point math ops on low-precision floats)PD"; }

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

  /// 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<math::MathDialect>();
    registry.insert<arith::ArithDialect>();
  }

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

  MathExtendToSupportedTypesBase(MathExtendToSupportedTypesOptions options) : MathExtendToSupportedTypesBase() {
    extraTypeStrs = std::move(options.extraTypeStrs);
    targetTypeStr = std::move(options.targetTypeStr);
  }
protected:
  ::mlir::Pass::ListOption<std::string> extraTypeStrs{*this, "extra-types", ::llvm::cl::desc(R"PO(MLIR types with arithmetic support on a given target (f64 and f32 are implicitly supported))PO")};
  ::mlir::Pass::Option<std::string> targetTypeStr{*this, "target-type", ::llvm::cl::desc(R"PO(MLIR type to convert the unsupported source types to)PO"), ::llvm::cl::init("f32")};
private:

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

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

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

std::unique_ptr<::mlir::Pass> createMathExtendToSupportedTypes(MathExtendToSupportedTypesOptions options) {
  return impl::createMathExtendToSupportedTypes(std::move(options));
}
#undef GEN_PASS_DEF_MATHEXTENDTOSUPPORTEDTYPES
#endif // GEN_PASS_DEF_MATHEXTENDTOSUPPORTEDTYPES

//===----------------------------------------------------------------------===//
// MathSincosFusionPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MATHSINCOSFUSIONPASS
std::unique_ptr<::mlir::Pass> createMathSincosFusionPass();
#undef GEN_PASS_DECL_MATHSINCOSFUSIONPASS
#endif // GEN_PASS_DECL_MATHSINCOSFUSIONPASS
#ifdef GEN_PASS_DEF_MATHSINCOSFUSIONPASS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Fuse sin and cos operations.)PD"; }

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// MathUpliftToFMA
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MATHUPLIFTTOFMA
std::unique_ptr<::mlir::Pass> createMathUpliftToFMA();
#undef GEN_PASS_DECL_MATHUPLIFTTOFMA
#endif // GEN_PASS_DECL_MATHUPLIFTTOFMA
#ifdef GEN_PASS_DEF_MATHUPLIFTTOFMA

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

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

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

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

  ::llvm::StringRef getDescription() const override { return R"PD(Uplift arith ops to math.fma.)PD"; }

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

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

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

protected:
private:

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

std::unique_ptr<::mlir::Pass> createMathUpliftToFMA() {
  return impl::createMathUpliftToFMA();
}
#undef GEN_PASS_DEF_MATHUPLIFTTOFMA
#endif // GEN_PASS_DEF_MATHUPLIFTTOFMA
#ifdef GEN_PASS_REGISTRATION
// Generate registrations for all passes.
#define GEN_PASS_REGISTRATION_MATHEXPANDOPSPASS
#define GEN_PASS_REGISTRATION_MATHEXTENDTOSUPPORTEDTYPES
#define GEN_PASS_REGISTRATION_MATHSINCOSFUSIONPASS
#define GEN_PASS_REGISTRATION_MATHUPLIFTTOFMA
#endif // GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// MathExpandOpsPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_MATHEXPANDOPSPASS

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

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

#undef GEN_PASS_REGISTRATION_MATHEXPANDOPSPASS
#endif // GEN_PASS_REGISTRATION_MATHEXPANDOPSPASS

//===----------------------------------------------------------------------===//
// MathExtendToSupportedTypes Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_MATHEXTENDTOSUPPORTEDTYPES

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

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

#undef GEN_PASS_REGISTRATION_MATHEXTENDTOSUPPORTEDTYPES
#endif // GEN_PASS_REGISTRATION_MATHEXTENDTOSUPPORTEDTYPES

//===----------------------------------------------------------------------===//
// MathSincosFusionPass Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_MATHSINCOSFUSIONPASS

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

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

#undef GEN_PASS_REGISTRATION_MATHSINCOSFUSIONPASS
#endif // GEN_PASS_REGISTRATION_MATHSINCOSFUSIONPASS

//===----------------------------------------------------------------------===//
// MathUpliftToFMA Registration
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_REGISTRATION_MATHUPLIFTTOFMA

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

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

#undef GEN_PASS_REGISTRATION_MATHUPLIFTTOFMA
#endif // GEN_PASS_REGISTRATION_MATHUPLIFTTOFMA
#ifdef GEN_PASS_REGISTRATION

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

inline void registerMathPasses() {
  registerMathExpandOpsPass();
  registerMathExtendToSupportedTypes();
  registerMathSincosFusionPass();
  registerMathUpliftToFMA();
}
#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
