Convert type
convert_type
¶
convert_type(type_attr: Attribute) -> ir.Type
¶
Convert an xDSL type attribute to an LLVM IR type.
This function handles the conversion of various xDSL type attributes (integers, floats, pointers, vectors, arrays, structs, tuples and functions) to their corresponding llvmlite IR type representations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type_attr
|
Attribute
|
The xDSL type attribute to convert. |
required |
Returns:
| Type | Description |
|---|---|
Type
|
The corresponding llvmlite IR type. |
Raises:
| Type | Description |
|---|---|
LLVMTranslationException
|
If the type is not supported, including: - Scalable vectors (vectors with scalable dimensions) - Multi-dimensional vectors (vectors with more than one dimension) - Any other unsupported type attribute |