llvm-project/mlir/test/mlir-tblgen
River Riddle 8c39e70679 [mlir][OpFormatGen] Add support for eliding UnitAttr when used to anchor an optional group
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
2020-08-03 14:31:41 -07:00
..
dialect.td [ODS] Allow dialect to specify C++ namespaces 2019-05-20 13:49:27 -07:00
expect-symbol.td Use `not` to invert return code in expected to fail tests 2019-10-30 14:38:18 -07:00
interfaces.mlir [mlir] Refactor InterfaceGen to support generating interfaces for Attributes and Types. 2020-06-30 15:52:33 -07:00
llvm-intrinsics.td [MLIR] Update intrinsic test, because ptrmask changed. 2020-05-15 14:35:39 -07:00
op-attribute.td [mlir-tblgen] Use fully qualified names in generated code files 2020-06-26 15:05:33 +02:00
op-decl.td [MLIR][TableGen] Add default value for named attributes for 2 more build methods 2020-07-16 09:32:19 -07:00
op-derived-attribute.mlir Change filecheck default to dump input on failure 2020-06-09 18:57:46 +00:00
op-format-spec.td [mlir] Add support for parsing optional Attribute values. 2020-07-14 13:14:59 -07:00
op-format.mlir [mlir][OpFormatGen] Add support for eliding UnitAttr when used to anchor an optional group 2020-08-03 14:31:41 -07:00
op-interface.td [mlir-tblgen] Use fully qualified names in generated code files 2020-06-26 15:05:33 +02:00
op-operand.td [mlir-tblgen] Use fully qualified names in generated code files 2020-06-26 15:05:33 +02:00
op-result.td [ods] Update Operator to record Arg->[Attr|Operand]Index mapping 2020-06-29 16:40:52 -07:00
op-side-effects.td [mlir-tblgen] Use fully qualified names in generated code files 2020-06-26 15:05:33 +02:00
pattern.mlir [MLIR] Remove TableGen redundant calls to native calls when creating new operations in DRR TableGen files 2020-06-22 08:12:04 -07:00
predicate.td [mlir-tblgen] Use fully qualified names in generated code files 2020-06-26 15:05:33 +02:00
return-types.mlir Change filecheck default to dump input on failure 2020-06-09 18:57:46 +00:00
types.mlir [mlir][core] Add IndexElementsAttr helpers. 2020-05-27 13:39:48 -07:00