20 struct VectorScaleOpInterface
21 :
public ValueBoundsOpInterface::ExternalModel<VectorScaleOpInterface,
25 auto *scalableCstr = dyn_cast<ScalableValueBoundsConstraintSet>(&cstr);
28 auto vscaleOp = cast<VectorScaleOp>(op);
29 assert(value == vscaleOp.getResult() &&
"invalid value");
30 if (
auto vscale = scalableCstr->getVscaleValue()) {
32 scalableCstr->bound(value) == cstr.
getExpr(vscale);
35 scalableCstr->bound(value) >= scalableCstr->getVscaleMin();
36 scalableCstr->bound(value) <= scalableCstr->getVscaleMax();
37 scalableCstr->setVscale(vscaleOp);
48 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.
Operation is the basic unit of execution within MLIR.
A helper class to be used with ValueBoundsOpInterface.
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.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
void registerValueBoundsOpInterfaceExternalModels(DialectRegistry ®istry)
Include the generated interface declarations.