[mlir] Add simple generator for return types
authorJacques Pienaar <jpienaar@google.com>
Wed, 27 May 2020 15:45:55 +0000 (08:45 -0700)
committerJacques Pienaar <jpienaar@google.com>
Wed, 27 May 2020 15:45:55 +0000 (08:45 -0700)
commit31f40f603d0c00b313397196124c5f39090badf0
treebd54008657142930546a38f101e5f59049baf0ad
parenta888fc6b3412574f5869a8680acf4ed2bed1d2a2
[mlir] Add simple generator for return types

Take advantage of equality constrains to generate the type inference interface.
This is used for equality and trivially built types. The type inference method
is only generated when no type inference trait is specified already.

This reorders verification that changes some test error messages.

Differential Revision: https://reviews.llvm.org/D80484
mlir/docs/OpDefinitions.md
mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
mlir/include/mlir/TableGen/Attribute.h
mlir/include/mlir/TableGen/Operator.h
mlir/lib/Dialect/Shape/IR/Shape.cpp
mlir/lib/TableGen/Attribute.cpp
mlir/lib/TableGen/Operator.cpp
mlir/test/lib/Dialect/Test/TestOps.td
mlir/test/mlir-tblgen/op-decl.td
mlir/test/mlir-tblgen/types.mlir
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp