forked from OSchip/llvm-project
8abc06f3d5
Dialect specific types are registered similarly to operations, i.e. registerType<...> within the dialect. Unlike operations, there is no notion of a "verbose" type, that is *all* types must be registered to a dialect. Casting support(isa/dyn_cast/etc.) is implemented by reserving a range of type kinds in the top level Type class as opposed to string comparison like operations. To support derived types a few hooks need to be implemented: In the concrete type class: - static char typeID; * A unique identifier for the type used during registration. In the Dialect: - typeParseHook and typePrintHook must be implemented to provide parser support. The syntax for dialect extended types is as follows: dialect-type: '!' dialect-namespace '<' '"' type-specific-data '"' '>' The 'type-specific-data' is information used to identify different types within the dialect, e.g: - !tf<"variant"> // Tensor Flow Variant Type - !tf<"string"> // Tensor Flow String Type TensorFlow/TensorFlowControl types are now implemented as dialect specific types as a proof of concept. PiperOrigin-RevId: 227580052 |
||
---|---|---|
.. | ||
AffineExpr.cpp | ||
AffineExprDetail.h | ||
AffineMap.cpp | ||
AffineMapDetail.h | ||
AsmPrinter.cpp | ||
AttributeDetail.h | ||
AttributeListStorage.h | ||
Attributes.cpp | ||
Block.cpp | ||
Builders.cpp | ||
BuiltinOps.cpp | ||
Dialect.cpp | ||
Function.cpp | ||
Instruction.cpp | ||
IntegerSet.cpp | ||
IntegerSetDetail.h | ||
Location.cpp | ||
LocationDetail.h | ||
MLIRContext.cpp | ||
Module.cpp | ||
Operation.cpp | ||
PatternMatch.cpp | ||
TypeDetail.h | ||
Types.cpp | ||
Value.cpp |