OSDN Git Service

[mlir] resolve types from attributes in assemblyFormat
authorMartin Waitz <tali@admingilde.org>
Tue, 7 Jul 2020 04:40:01 +0000 (04:40 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Tue, 7 Jul 2020 04:40:01 +0000 (04:40 +0000)
commit72df59d59097a0c9ed5f420401cf377eaff896aa
tree9e8d8abfd0e877b6d8f538501f6c52251b287bc9
parent3b5db7fc69bb1efac6f017830af98f192a1f8ab4
[mlir] resolve types from attributes in assemblyFormat

An operation can specify that an operation or result type matches the
type of another operation, result, or attribute via the `AllTypesMatch`
or `TypesMatchWith` constraints.

Use these constraints to also automatically resolve types in the
automatically generated assembly parser.
This way, only the attribute needs to be listed in `assemblyFormat`,
e.g. for constant operations.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D78434
mlir/docs/OpDefinitions.md
mlir/test/lib/Dialect/Test/TestOps.td
mlir/test/mlir-tblgen/op-format.mlir
mlir/tools/mlir-tblgen/OpFormatGen.cpp