/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |* *| |* Interface Declarations *| |* *| |* Automatically generated file, do not edit! *| |* *| \*===----------------------------------------------------------------------===*/ namespace mlir { /// This interface allows operations with index-typed and/or shaped value-typed /// results/block arguments to specify range bounds. These bounds are stored in /// a constraint set. The constraint set can then be queried to compute bounds /// in terms of other values that are stored in the constraint set. class ValueBoundsOpInterface; } // namespace mlir namespace mlir { /// This interface allows operations with index-typed and/or shaped value-typed /// results/block arguments to specify range bounds. These bounds are stored in /// a constraint set. The constraint set can then be queried to compute bounds /// in terms of other values that are stored in the constraint set. namespace detail { struct ValueBoundsOpInterfaceInterfaceTraits { struct Concept { /// The methods defined by the interface. void (*populateBoundsForIndexValue)(const Concept *impl, ::mlir::Operation *, ::mlir::Value, ::mlir::ValueBoundsConstraintSet &); void (*populateBoundsForShapedValueDim)(const Concept *impl, ::mlir::Operation *, ::mlir::Value, int64_t, ::mlir::ValueBoundsConstraintSet &); }; template class Model : public Concept { public: using Interface = ::mlir::ValueBoundsOpInterface; Model() : Concept{populateBoundsForIndexValue, populateBoundsForShapedValueDim} {} static inline void populateBoundsForIndexValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value value, ::mlir::ValueBoundsConstraintSet & cstr); static inline void populateBoundsForShapedValueDim(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value value, int64_t dim, ::mlir::ValueBoundsConstraintSet & cstr); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::ValueBoundsOpInterface; FallbackModel() : Concept{populateBoundsForIndexValue, populateBoundsForShapedValueDim} {} static inline void populateBoundsForIndexValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value value, ::mlir::ValueBoundsConstraintSet & cstr); static inline void populateBoundsForShapedValueDim(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value value, int64_t dim, ::mlir::ValueBoundsConstraintSet & cstr); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteOp; void populateBoundsForIndexValue(::mlir::Operation *tablegen_opaque_val, ::mlir::Value value, ::mlir::ValueBoundsConstraintSet &cstr) const; void populateBoundsForShapedValueDim(::mlir::Operation *tablegen_opaque_val, ::mlir::Value value, int64_t dim, ::mlir::ValueBoundsConstraintSet &cstr) const; }; }; template struct ValueBoundsOpInterfaceTrait; } // namespace detail class ValueBoundsOpInterface : public ::mlir::OpInterface { public: using ::mlir::OpInterface::OpInterface; template struct Trait : public detail::ValueBoundsOpInterfaceTrait {}; /// Populate the constraint set with bounds for the given index-typed /// value. /// /// Note: If `value` is a block argument, it must belong to an entry block /// of a region. Unstructured control flow graphs are not supported at the /// moment. void populateBoundsForIndexValue(::mlir::Value value, ::mlir::ValueBoundsConstraintSet & cstr); /// Populate the constraint set with bounds for the size of the specified /// dimension of the given shaped value. /// /// Note: If `value` is a block argument, it must belong to an entry block /// of a region. Unstructured control flow graphs are not supported at the /// moment. void populateBoundsForShapedValueDim(::mlir::Value value, int64_t dim, ::mlir::ValueBoundsConstraintSet & cstr); }; } // namespace mlir namespace mlir::detail { template struct ValueBoundsOpInterfaceTrait : public ::mlir::OpInterface::Trait { /// Populate the constraint set with bounds for the given index-typed /// value. /// /// Note: If `value` is a block argument, it must belong to an entry block /// of a region. Unstructured control flow graphs are not supported at the /// moment. void populateBoundsForIndexValue(::mlir::Value value, ::mlir::ValueBoundsConstraintSet & cstr) { llvm_unreachable("not implemented"); } /// Populate the constraint set with bounds for the size of the specified /// dimension of the given shaped value. /// /// Note: If `value` is a block argument, it must belong to an entry block /// of a region. Unstructured control flow graphs are not supported at the /// moment. void populateBoundsForShapedValueDim(::mlir::Value value, int64_t dim, ::mlir::ValueBoundsConstraintSet & cstr) { llvm_unreachable("not implemented"); } }; } // namespace mlir::detail namespace mlir { template void detail::ValueBoundsOpInterfaceInterfaceTraits::Model::populateBoundsForIndexValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value value, ::mlir::ValueBoundsConstraintSet & cstr) { return (llvm::cast(tablegen_opaque_val)).populateBoundsForIndexValue(value, cstr); } template void detail::ValueBoundsOpInterfaceInterfaceTraits::Model::populateBoundsForShapedValueDim(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value value, int64_t dim, ::mlir::ValueBoundsConstraintSet & cstr) { return (llvm::cast(tablegen_opaque_val)).populateBoundsForShapedValueDim(value, dim, cstr); } template void detail::ValueBoundsOpInterfaceInterfaceTraits::FallbackModel::populateBoundsForIndexValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value value, ::mlir::ValueBoundsConstraintSet & cstr) { return static_cast(impl)->populateBoundsForIndexValue(tablegen_opaque_val, value, cstr); } template void detail::ValueBoundsOpInterfaceInterfaceTraits::FallbackModel::populateBoundsForShapedValueDim(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::mlir::Value value, int64_t dim, ::mlir::ValueBoundsConstraintSet & cstr) { return static_cast(impl)->populateBoundsForShapedValueDim(tablegen_opaque_val, value, dim, cstr); } template void detail::ValueBoundsOpInterfaceInterfaceTraits::ExternalModel::populateBoundsForIndexValue(::mlir::Operation *tablegen_opaque_val, ::mlir::Value value, ::mlir::ValueBoundsConstraintSet &cstr) const { llvm_unreachable("not implemented"); } template void detail::ValueBoundsOpInterfaceInterfaceTraits::ExternalModel::populateBoundsForShapedValueDim(::mlir::Operation *tablegen_opaque_val, ::mlir::Value value, int64_t dim, ::mlir::ValueBoundsConstraintSet &cstr) const { llvm_unreachable("not implemented"); } } // namespace mlir