llvm-project/mlir/examples
Mogball 4957518ef5 [mlir][ods] Simplify useDefaultType/AttributePrinterParser
The current behaviour of `useDefaultTypePrinterParser` and `useDefaultAttributePrinterParser` is that they are set by default, but the dialect generator only generates the declarations for the parsing and printing hooks if it sees dialect types and attributes. Same goes for the definitions generated by the AttrOrTypeDef generator.

This can lead to confusing and undesirable behaviour if the dialect generator doesn't see the definitions of the attributes and types, for example, if they are sensibly separated into different files: `Dialect.td`, `Ops.td`, `Attributes.td`, and `Types.td`.

Now, these bits are unset by default. Setting them will always result in the dialect generator emitting the declarations for the parsing hooks. And if the AttrOrTypeDef generator sees it set, it will generate the default implementations.

Reviewed By: rriddle, stellaraccident

Differential Revision: https://reviews.llvm.org/D125809
2022-05-18 17:22:11 +00:00
..
standalone [mlir] Attach InferTypeOpInterface on SameOperandsAndResultType operations when possible 2022-04-28 12:57:59 -07:00
toy [mlir][ods] Simplify useDefaultType/AttributePrinterParser 2022-05-18 17:22:11 +00:00
CMakeLists.txt