20struct VectorScaleOpInterface
21 :
public ValueBoundsOpInterface::ExternalModel<VectorScaleOpInterface,
23 void populateBoundsForIndexValue(Operation *op, Value value,
24 ValueBoundsConstraintSet &cstr)
const {
26 cstr.
bound(value) >= 1;
27 auto *scalableCstr = dyn_cast<ScalableValueBoundsConstraintSet>(&cstr);
30 auto vscaleOp = cast<VectorScaleOp>(op);
31 assert(value == vscaleOp.getResult() &&
"invalid value");
32 if (
auto vscale = scalableCstr->getVscaleValue()) {
34 scalableCstr->bound(value) == cstr.
getExpr(vscale);
37 scalableCstr->bound(value) >= scalableCstr->getVscaleMin();
38 scalableCstr->bound(value) <= scalableCstr->getVscaleMax();
39 scalableCstr->setVscale(vscaleOp);
50 vector::VectorScaleOp::attachInterface<vector::VectorScaleOpInterface>(
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
bool addExtension(TypeID extensionID, std::unique_ptr< DialectExtensionBase > extension)
Add the given extension to the registry.
MLIRContext is the top-level object for a collection of MLIR operations.
AffineExpr getExpr(Value value, std::optional< int64_t > dim=std::nullopt)
Return an expression that represents the given index-typed value or shaped value dimension.
BoundBuilder bound(Value value)
Add a bound for the given index-typed value or shaped value.
void registerValueBoundsOpInterfaceExternalModels(DialectRegistry ®istry)
Include the generated interface declarations.