forked from OSchip/llvm-project
8c39e70679
Unit attributes are given meaning by their existence, and thus have no meaningful value beyond "is it present". As such, in the format of an operation unit attributes are generally used to guard the printing of other elements and aren't generally printed themselves; as the presence of the group when parsing means that the unit attribute should be added. This revision adds support to the declarative format for eliding unit attributes in situations where they anchor an optional group, but aren't the first element. For example, ``` let assemblyFormat = "(`is_optional` $unit_attr^)? attr-dict"; ``` would print `foo.op is_optional` when $unit_attr is present, instead of the current `foo.op is_optional unit`. Differential Revision: https://reviews.llvm.org/D84577 |
||
---|---|---|
.. | ||
dialect.td | ||
expect-symbol.td | ||
interfaces.mlir | ||
llvm-intrinsics.td | ||
op-attribute.td | ||
op-decl.td | ||
op-derived-attribute.mlir | ||
op-format-spec.td | ||
op-format.mlir | ||
op-interface.td | ||
op-operand.td | ||
op-result.td | ||
op-side-effects.td | ||
pattern.mlir | ||
predicate.td | ||
return-types.mlir | ||
types.mlir |