Skip to content

Commit 5db5dd7

Browse files
authored
[mlir][NFC] Document predicate field on properties (llvm#120975)
1 parent 378e179 commit 5db5dd7

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

mlir/docs/DefiningDialects/Operations.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ their semantics via a special [TableGen backend][TableGenBackend]:
102102
constraints over attributes. A notable subclass hierarchy is `Attr`, which
103103
stands for constraints for attributes whose values are of common types.
104104
* The `Property` class hierarchy: They are used to specify non-attribute-backed
105-
properties that are inherent to operations. This will be expanded to a
106-
`PropertyConstraint` class or something similar in the future.
105+
properties that are inherent to operations. These properties can have
106+
constraints imposed on them using the `predicate` field or the
107+
`ConfinedProp` class.
107108

108109
An operation is defined by specializing the `Op` class with concrete contents
109110
for all the fields it requires. For example, `tf.AvgPool` is defined as
@@ -202,15 +203,15 @@ let arguments = (ins
202203
...
203204
<attr-constraint>:$<attr-name>,
204205
...
205-
<property-constraint>:$<property-name>,
206+
<property>:$<property-name>,
206207
);
207208
```
208209

209210
Here `<type-constraint>` is a TableGen `def` from the `TypeConstraint` class
210211
hierarchy. Similarly, `<attr-constraint>` is a TableGen `def` from the
211-
`AttrConstraint` class hierarchy and `<property-constraint>` is a subclass
212-
of `Property` (though a `PropertyConstraint` hierarchy is planned).
213-
See [Constraints](#constraints) for more information.
212+
`AttrConstraint` class hierarchy and `<property>` is a subclass
213+
of `Property` (constraints can be imposed onto it using its `predicate` field
214+
or the `ConfinedProp` subclass).
214215

215216
There is no requirements on the relative order of operands and attributes; they
216217
can mix freely. The relative order of operands themselves matters. From each

0 commit comments

Comments
 (0)