/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |* *| |* Interface Declarations *| |* *| |* Automatically generated file, do not edit! *| |* *| \*===----------------------------------------------------------------------===*/ namespace mlir { /// A cast-like operation is one that converts from a set of input types to a /// set of output types. The arity of the inputs may be from 0-N, whereas the /// arity of the outputs may be anything from 1-N. Cast-like operations are /// trivially removable in cases where they produce an No-op, i.e when the /// input types and output types match 1-1. class CastOpInterface; } // namespace mlir namespace mlir { /// A cast-like operation is one that converts from a set of input types to a /// set of output types. The arity of the inputs may be from 0-N, whereas the /// arity of the outputs may be anything from 1-N. Cast-like operations are /// trivially removable in cases where they produce an No-op, i.e when the /// input types and output types match 1-1. namespace detail { struct CastOpInterfaceInterfaceTraits { struct Concept { /// The methods defined by the interface. bool (*areCastCompatible)(::mlir::TypeRange, ::mlir::TypeRange); }; template class Model : public Concept { public: using Interface = ::mlir::CastOpInterface; Model() : Concept{areCastCompatible} {} static inline bool areCastCompatible(::mlir::TypeRange inputs, ::mlir::TypeRange outputs); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::CastOpInterface; FallbackModel() : Concept{areCastCompatible} {} static inline bool areCastCompatible(::mlir::TypeRange inputs, ::mlir::TypeRange outputs); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteOp; }; }; template struct CastOpInterfaceTrait; } // namespace detail class CastOpInterface : public ::mlir::OpInterface { public: using ::mlir::OpInterface::OpInterface; template struct Trait : public detail::CastOpInterfaceTrait {}; /// Returns true if the given set of input and result types are compatible /// to cast using this cast operation. bool areCastCompatible(::mlir::TypeRange inputs, ::mlir::TypeRange outputs); }; } // namespace mlir namespace mlir::detail { template struct CastOpInterfaceTrait : public ::mlir::OpInterface::Trait { static ::llvm::LogicalResult verifyTrait(::mlir::Operation *op) { return impl::verifyCastInterfaceOp(op); } /// Attempt to fold the given cast operation. static LogicalResult foldTrait(Operation *op, ArrayRef operands, SmallVectorImpl &results) { return impl::foldCastInterfaceOp(op, operands, results); } }; } // namespace mlir::detail namespace mlir { template bool detail::CastOpInterfaceInterfaceTraits::Model::areCastCompatible(::mlir::TypeRange inputs, ::mlir::TypeRange outputs) { return ConcreteOp::areCastCompatible(inputs, outputs); } template bool detail::CastOpInterfaceInterfaceTraits::FallbackModel::areCastCompatible(::mlir::TypeRange inputs, ::mlir::TypeRange outputs) { return ConcreteOp::areCastCompatible(inputs, outputs); } } // namespace mlir