C type context
c_type_context
¶
CFuncSignature
¶
CTypeContext
¶
Registry of xDSL attribute classes to C type converters.
Source code in xdsl/jit/c_type_context.py
registry: dict[type[Attribute], Callable[[Any], str]] = {}
instance-attribute
¶
Map from an xDSL attribute class to a converter producing its C type.
__init__() -> None
¶
register_type(attr_type: type[Attribute], converter: Callable[[Any], str]) -> None
¶
Register how attr_type instances map to a C type.
to_c_type(type_attr: Attribute) -> str
¶
Return the C type for type_attr.
Source code in xdsl/jit/c_type_context.py
to_c_func_type(inputs: Iterable[Attribute], output: Attribute) -> CFuncSignature
¶
Build a C function signature from IR argument and result types.