Convert op
convert_op
CastInstrWithFlags
Bases: CastInstr
Source code in xdsl/backend/llvm/convert_op.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
__init__(parent: LLVMBlock, op: str, val: Value, typ: Type, name: str = '', flags: tuple[str, ...] | list[str] = ())
Source code in xdsl/backend/llvm/convert_op.py
106 107 108 109 110 111 112 113 114 115 116 117 | |
descr(buf: list[str]) -> None
Source code in xdsl/backend/llvm/convert_op.py
119 120 121 122 123 124 125 126 | |
convert_op(op: Operation, builder: ir.IRBuilder, val_map: dict[SSAValue, ir.Value], block_map: dict[Block, LLVMBlock] | None = None)
Convert an xDSL operation to an llvmlite LLVM IR.
Side effects
Mutates val_map by adding entries for the operation's results.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
op
|
Operation
|
The xDSL operation to convert |
required |
builder
|
IRBuilder
|
The LLVM IR builder for constructing instructions |
required |
val_map
|
dict[SSAValue, Value]
|
The Mapping from xDSL SSA values to LLVM IR values. This dictionary is mutated to store the LLVM IR value produced by this operation for use by subsequent operations. |
required |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If the operation is not supported. |
Source code in xdsl/backend/llvm/convert_op.py
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | |