llvm/tools/mlir/include/mlir/Dialect/Math/Transforms/Passes.h.inc

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

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_MATHLEGALIZETOF32
#define GEN_PASS_DECL_MATHUPLIFTTOFMA
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// MathLegalizeToF32
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_MATHLEGALIZETOF32
std::unique_ptr<::mlir::Pass> createMathLegalizeToF32();
#undef GEN_PASS_DECL_MATHLEGALIZETOF32
#endif // GEN_PASS_DECL_MATHLEGALIZETOF32
#ifdef GEN_PASS_DEF_MATHLEGALIZETOF32

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

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

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

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

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

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

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// 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 "Uplift arith ops to math.fma."; }

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

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

inline void registerMathLegalizeToF32() {}

// Old registration code, kept for temporary backwards compatibility.
inline void registerMathLegalizeToF32Pass() {}

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

inline void registerMathUpliftToFMA() {}

// Old registration code, kept for temporary backwards compatibility.
inline void registerMathUpliftToFMAPass() {}

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

inline void registerMathPasses() {}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
// Deprecated. Please use the new per-pass macros.
#ifdef GEN_PASS_CLASSES

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

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

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

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

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

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

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

  /// Register the dialects that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<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(MathLegalizeToF32Base<DerivedT>)

protected:
};

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 "Uplift arith ops to math.fma."; }

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

  /// Register the dialects 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:
};
#undef GEN_PASS_CLASSES
#endif // GEN_PASS_CLASSES