[mlir][ods] Fix unused uniqued attr constraint

Derived attributes' constraints are no longer uniqued - derived
attributes' verifiers are not automatically generated.
This commit is contained in:
Mogball 2021-11-14 23:23:14 +00:00
parent 5f5f3ac5a3
commit 0b158c6c7d

View File

@ -313,6 +313,7 @@ void StaticVerifierFunctionEmitter::collectOpConstraints(
/// Collect attribute constraints.
for (const NamedAttribute &namedAttr : op.getAttributes()) {
if (!namedAttr.attr.getPredicate().isNull() &&
!namedAttr.attr.isDerivedAttr() &&
canUniqueAttrConstraint(namedAttr.attr))
collectConstraint(attrConstraints, "attr", namedAttr.attr);
}