Convert op
convert_op
CastInstrWithFlags
Bases: CastInstr
Source code in xdsl/backend/llvm/convert_op.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
__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
114 115 116 117 118 119 120 121 122 123 124 125 | |
descr(buf: list[str]) -> None
Source code in xdsl/backend/llvm/convert_op.py
127 128 129 130 131 132 133 134 | |
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
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 | |