Llvm
llvm
GEP_USE_SSA_VAL = -2147483648
module-attribute
This is used in the getelementptr index list to signify that an ssa value should be used for this index.
ALL_ICMP_FLAGS = tuple(ICmpPredicateFlag)
module-attribute
ICMP_INDEX_BY_FLAG = {f: i for i, f in (enumerate(ALL_ICMP_FLAGS))}
module-attribute
ASM_DIALECT_NAME_BY_KEY: dict[int, str] = {0: 'att', 1: 'intel'}
module-attribute
Mapping from LLVM inline-assembly dialect integer values to their textual keyword form. See external documentation for the MLIR op, and LLVM LangRef for the underlying semantics.
ASM_DIALECT_KEY_BY_NAME: dict[str, int] = {v: k for k, v in (ASM_DIALECT_NAME_BY_KEY.items())}
module-attribute
Inverse of ASM_DIALECT_NAME_BY_KEY: maps keyword strings to integer keys.
ATOMIC_ORDERING_KEYWORDS: dict[int, str] = {1: 'unordered', 2: 'monotonic', 4: 'acquire', 5: 'release', 6: 'acq_rel', 7: 'seq_cst'}
module-attribute
Mapping from LLVM atomic ordering integer values to their textual keyword form.
See LLVM LangRef for the semantics of each ordering, and MLIR LLVM dialect for the corresponding MLIR enum values.
UNNAMED_ADDR_KEYWORD_BY_KEY: dict[int, str] = {1: 'local_unnamed_addr', 2: 'unnamed_addr'}
module-attribute
Mapping from LLVM unnamed_addr integer values to their textual keyword form
(0 = no keyword). See external
documentation
for the MLIR op, and
LLVM LangRef for the
underlying semantics.
UNNAMED_ADDR_KEY_BY_KEYWORD: dict[str, int] = {v: k for k, v in (UNNAMED_ADDR_KEYWORD_BY_KEY.items())}
module-attribute
Reverse mapping from keyword string to integer key.
LLVM_CALLING_CONVS: set[str] = {'ccc', 'fastcc', 'coldcc', 'cc 10', 'cc 11', 'webkit_jscc', 'anyregcc', 'preserve_mostcc', 'preserve_allcc', 'cxx_fast_tlscc', 'tailcc', 'swiftcc', 'swifttailcc', 'cfguard_checkcc'}
module-attribute
A list of all valid calling conventions understood by LLVM, see external documentation here for more info.
LLVMType = LLVMStructType | LLVMPointerType | LLVMArrayType | LLVMVoidType | LLVMFunctionType
module-attribute
LLVMTypeConstr = base(LLVMStructType) | base(LLVMPointerType) | base(LLVMArrayType) | base(LLVMVoidType) | base(LLVMFunctionType)
module-attribute
ALL_FCMP_FLAGS = tuple(FCmpPredicateFlag)
module-attribute
FCMP_INDEX_BY_FLAG = {f: i for i, f in (enumerate(ALL_FCMP_FLAGS))}
module-attribute
LLVM = Dialect('llvm', [AShrOp, AddOp, AddressOfOp, AllocaOp, AndOp, BitcastOp, BrOp, CallIntrinsicOp, CallOp, CondBrOp, ConstantOp, ExtractValueOp, FAbsOp, FAddOp, FCeilOp, FCmpOp, FCopySignOp, FCosOp, FDivOp, FExpOp, FFloorOp, FExp2Op, FLogOp, FLog2Op, FMAOp, FMulOp, FNegOp, FPExtOp, FPowOp, FRemOp, FSinOp, FSqrtOp, FSubOp, FuncOp, GEPOp, GlobalOp, ICmpOp, InlineAsmOp, InsertElementOp, InsertValueOp, IntToPtrOp, LShrOp, LoadOp, MaskedStoreOp, MulOp, OrOp, PtrToIntOp, ReturnOp, SDivOp, SExtOp, SelectOp, SIToFPOp, SRemOp, ShlOp, ShuffleVectorOp, StackRestoreOp, StackSaveOp, StoreOp, SubOp, TruncOp, UDivOp, URemOp, UndefOp, UnreachableOp, VectorFMaxOp, VectorFMinOp, VectorReduceFAddOp, VectorReduceFMulOp, XOrOp, ZExtOp, ZeroOp], [CallingConventionAttr, FastMathAttr, FramePointerKindAttr, LLVMArrayType, LLVMFunctionType, LLVMPointerType, LLVMStructType, LLVMVoidType, LinkageAttr, OverflowAttr, TailCallKindAttr, TargetFeaturesAttr])
module-attribute
LLVMStructType
dataclass
Bases: ParametrizedAttribute, TypeAttribute
See external documentation.
Source code in xdsl/dialects/llvm.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
name = 'llvm.struct'
class-attribute
instance-attribute
struct_name: StringAttr
instance-attribute
types: ArrayAttr[Attribute]
instance-attribute
from_type_list(types: Sequence[Attribute]) -> LLVMStructType
staticmethod
Source code in xdsl/dialects/llvm.py
157 158 159 | |
print_parameters(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
161 162 163 164 165 166 167 | |
parse_parameters(parser: AttrParser) -> tuple[StringAttr, ArrayAttr]
classmethod
Source code in xdsl/dialects/llvm.py
169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
LLVMPointerType
Bases: ParametrizedAttribute, TypeAttribute
Source code in xdsl/dialects/llvm.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
name = 'llvm.ptr'
class-attribute
instance-attribute
addr_space: IntAttr | NoneAttr
instance-attribute
print_parameters(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
191 192 193 194 | |
parse_parameters(parser: AttrParser) -> tuple[IntAttr | NoneAttr]
classmethod
Source code in xdsl/dialects/llvm.py
196 197 198 199 200 201 202 | |
__init__(addr_space: IntAttr | NoneAttr = NoneAttr())
Source code in xdsl/dialects/llvm.py
204 205 | |
LLVMArrayType
dataclass
Bases: ParametrizedAttribute, TypeAttribute
Source code in xdsl/dialects/llvm.py
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | |
name = 'llvm.array'
class-attribute
instance-attribute
size: IntAttr = param_def(converter=(IntAttr.get))
class-attribute
instance-attribute
type: Attribute
instance-attribute
print_parameters(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
215 216 217 218 219 | |
parse_parameters(parser: AttrParser) -> tuple[IntAttr, Attribute]
classmethod
Source code in xdsl/dialects/llvm.py
221 222 223 224 225 226 227 | |
LLVMVoidType
dataclass
Bases: ParametrizedAttribute, TypeAttribute
Source code in xdsl/dialects/llvm.py
230 231 232 | |
name = 'llvm.void'
class-attribute
instance-attribute
LLVMFunctionType
Bases: ParametrizedAttribute, TypeAttribute
Currently does not support variadics.
See external documentation.
Source code in xdsl/dialects/llvm.py
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 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 | |
name = 'llvm.func'
class-attribute
instance-attribute
inputs: ArrayAttr[Attribute]
instance-attribute
output: Attribute
instance-attribute
variadic: UnitAttr | NoneAttr
instance-attribute
is_variadic: bool
property
__init__(inputs: Sequence[Attribute] | ArrayAttr[Attribute], output: Attribute | None = None, is_variadic: bool = False) -> None
Source code in xdsl/dialects/llvm.py
283 284 285 286 287 288 289 290 291 292 293 294 | |
verify() -> None
Source code in xdsl/dialects/llvm.py
300 301 302 303 304 305 306 307 308 309 310 311 | |
print_parameters(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
parse_parameters(parser: AttrParser) -> list[Attribute]
classmethod
Source code in xdsl/dialects/llvm.py
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 | |
LinkageAttr
Bases: ParametrizedAttribute
Source code in xdsl/dialects/llvm.py
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | |
name = 'llvm.linkage'
class-attribute
instance-attribute
linkage: StringAttr
instance-attribute
__init__(linkage: str | StringAttr) -> None
Source code in xdsl/dialects/llvm.py
387 388 389 390 | |
print_parameters(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
392 393 394 395 | |
parse_parameters(parser: AttrParser) -> list[Attribute]
classmethod
Source code in xdsl/dialects/llvm.py
397 398 399 400 401 402 403 404 405 406 407 408 | |
verify()
Source code in xdsl/dialects/llvm.py
410 411 412 | |
ArithmeticBinOperation
Bases: IRDLOperation, ABC
Class for arithmetic binary operations.
Source code in xdsl/dialects/llvm.py
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | |
T: ClassVar = VarConstraint('T', SignlessIntegerConstraint | VectorType.constr(SignlessIntegerConstraint))
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(lhs: SSAValue, rhs: SSAValue, attributes: dict[str, Attribute] = {})
Source code in xdsl/dialects/llvm.py
428 429 430 431 432 433 434 435 436 437 438 | |
parse(parser: Parser)
classmethod
Source code in xdsl/dialects/llvm.py
440 441 442 443 444 445 446 447 448 449 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
451 452 453 454 455 456 457 458 | |
OverflowFlag
Bases: StrEnum
Source code in xdsl/dialects/llvm.py
461 462 463 | |
NO_SIGNED_WRAP = 'nsw'
class-attribute
instance-attribute
NO_UNSIGNED_WRAP = 'nuw'
class-attribute
instance-attribute
OverflowAttrBase
dataclass
Bases: BitEnumAttribute[OverflowFlag]
Source code in xdsl/dialects/llvm.py
466 467 468 | |
none_value = 'none'
class-attribute
instance-attribute
__init__(data: DataElement) -> None
OverflowAttr
dataclass
Bases: OverflowAttrBase
Source code in xdsl/dialects/llvm.py
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 | |
name = 'llvm.overflow'
class-attribute
instance-attribute
parse(parser: Parser) -> OverflowAttr
classmethod
Source code in xdsl/dialects/llvm.py
475 476 477 478 479 | |
print(printer: Printer)
Source code in xdsl/dialects/llvm.py
481 482 483 484 | |
to_int() -> int
Source code in xdsl/dialects/llvm.py
486 487 488 489 490 491 492 | |
from_int(i: int) -> OverflowAttr
staticmethod
Source code in xdsl/dialects/llvm.py
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | |
ArithmeticBinOpOverflow
Bases: IRDLOperation, ABC
Class for arithmetic binary operations that use overflow flags.
Source code in xdsl/dialects/llvm.py
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 557 558 559 560 561 562 563 564 | |
T: ClassVar = VarConstraint('T', SignlessIntegerConstraint | VectorType.constr(SignlessIntegerConstraint))
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
overflowFlags = opt_prop_def(IntegerAttr[I32])
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(lhs: SSAValue, rhs: SSAValue, attributes: dict[str, Attribute] = {}, overflow: OverflowAttr | IntegerAttr = IntegerAttr(0, 32))
Source code in xdsl/dialects/llvm.py
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 | |
parse(parser: Parser)
classmethod
Source code in xdsl/dialects/llvm.py
543 544 545 546 547 548 549 550 551 552 553 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
555 556 557 558 559 560 561 562 563 564 | |
ArithmeticBinOpExact
Bases: IRDLOperation, ABC
Class for arithmetic binary operations that use an exact flag.
Source code in xdsl/dialects/llvm.py
567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | |
T: ClassVar = VarConstraint('T', SignlessIntegerConstraint | VectorType.constr(SignlessIntegerConstraint))
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
is_exact = opt_prop_def(UnitAttr, prop_name='isExact')
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(lhs: SSAValue, rhs: SSAValue, attributes: dict[str, Attribute] = {}, is_exact: UnitAttr | None = None)
Source code in xdsl/dialects/llvm.py
581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 | |
parse_exact(parser: Parser)
classmethod
Source code in xdsl/dialects/llvm.py
597 598 599 600 | |
print_exact(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
602 603 604 | |
parse(parser: Parser)
classmethod
Source code in xdsl/dialects/llvm.py
606 607 608 609 610 611 612 613 614 615 616 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
618 619 620 621 622 623 624 625 626 | |
ArithmeticBinOpDisjoint
Bases: IRDLOperation, ABC
Class for arithmetic binary operations that use a disjoint flag.
Source code in xdsl/dialects/llvm.py
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 | |
T: ClassVar = VarConstraint('T', SignlessIntegerConstraint | VectorType.constr(SignlessIntegerConstraint))
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
is_disjoint = opt_prop_def(UnitAttr, prop_name='isDisjoint')
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
assembly_format = '(`disjoint` $isDisjoint^)? $lhs `,` $rhs attr-dict `:` type($res)'
class-attribute
instance-attribute
__init__(lhs: SSAValue, rhs: SSAValue, attributes: dict[str, Attribute] = {}, is_disjoint: UnitAttr | None = None)
Source code in xdsl/dialects/llvm.py
647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 | |
IntegerConversionOp
Bases: IRDLOperation, ABC
Source code in xdsl/dialects/llvm.py
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 | |
arg = operand_def(SignlessIntegerConstraint | VectorType.constr(SignlessIntegerConstraint))
class-attribute
instance-attribute
res = result_def(SignlessIntegerConstraint | VectorType.constr(SignlessIntegerConstraint))
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(arg: SSAValue, res_type: Attribute, attributes: dict[str, Attribute] = {})
Source code in xdsl/dialects/llvm.py
675 676 677 678 679 680 681 | |
parse(parser: Parser)
classmethod
Source code in xdsl/dialects/llvm.py
683 684 685 686 687 688 689 690 691 692 | |
print(printer: Printer)
Source code in xdsl/dialects/llvm.py
694 695 696 697 698 699 700 701 | |
IntegerConversionOpNNeg
Bases: IRDLOperation, ABC
Source code in xdsl/dialects/llvm.py
704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 | |
arg = operand_def(SignlessIntegerConstraint | VectorType.constr(SignlessIntegerConstraint))
class-attribute
instance-attribute
res = result_def(SignlessIntegerConstraint | VectorType.constr(SignlessIntegerConstraint))
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
non_neg = opt_prop_def(UnitAttr, prop_name='nonNeg')
class-attribute
instance-attribute
assembly_format = '(`nneg` $nonNeg^)? $arg attr-dict `:` type($arg) `to` type($res)'
class-attribute
instance-attribute
__init__(arg: SSAValue, res_type: Attribute, attributes: dict[str, Attribute] = {}, non_neg: UnitAttr | None = None)
Source code in xdsl/dialects/llvm.py
716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 | |
IntegerConversionOpOverflow
Bases: IRDLOperation, ABC
Source code in xdsl/dialects/llvm.py
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 | |
arg = operand_def(SignlessIntegerConstraint | VectorType.constr(SignlessIntegerConstraint))
class-attribute
instance-attribute
res = result_def(SignlessIntegerConstraint | VectorType.constr(SignlessIntegerConstraint))
class-attribute
instance-attribute
overflowFlags = opt_prop_def(OverflowAttr)
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(arg: SSAValue, res_type: Attribute, attributes: dict[str, Attribute] = {}, overflow: OverflowAttr = OverflowAttr(None))
Source code in xdsl/dialects/llvm.py
743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 | |
parse(parser: Parser)
classmethod
Source code in xdsl/dialects/llvm.py
759 760 761 762 763 764 765 766 767 768 769 | |
print(printer: Printer)
Source code in xdsl/dialects/llvm.py
771 772 773 774 775 776 777 778 779 780 | |
AddOp
dataclass
Bases: ArithmeticBinOpOverflow
Source code in xdsl/dialects/llvm.py
783 784 785 | |
name = 'llvm.add'
class-attribute
instance-attribute
SubOp
dataclass
Bases: ArithmeticBinOpOverflow
Source code in xdsl/dialects/llvm.py
788 789 790 | |
name = 'llvm.sub'
class-attribute
instance-attribute
MulOp
dataclass
Bases: ArithmeticBinOpOverflow
Source code in xdsl/dialects/llvm.py
793 794 795 | |
name = 'llvm.mul'
class-attribute
instance-attribute
UDivOp
dataclass
Bases: ArithmeticBinOpExact
Source code in xdsl/dialects/llvm.py
798 799 800 | |
name = 'llvm.udiv'
class-attribute
instance-attribute
SDivOp
dataclass
Bases: ArithmeticBinOpExact
Source code in xdsl/dialects/llvm.py
803 804 805 | |
name = 'llvm.sdiv'
class-attribute
instance-attribute
URemOp
dataclass
Bases: ArithmeticBinOperation
Source code in xdsl/dialects/llvm.py
808 809 810 | |
name = 'llvm.urem'
class-attribute
instance-attribute
SRemOp
dataclass
Bases: ArithmeticBinOperation
Source code in xdsl/dialects/llvm.py
813 814 815 | |
name = 'llvm.srem'
class-attribute
instance-attribute
AndOp
dataclass
Bases: ArithmeticBinOperation
Source code in xdsl/dialects/llvm.py
818 819 820 | |
name = 'llvm.and'
class-attribute
instance-attribute
OrOp
dataclass
Bases: ArithmeticBinOpDisjoint
Source code in xdsl/dialects/llvm.py
823 824 825 | |
name = 'llvm.or'
class-attribute
instance-attribute
XOrOp
dataclass
Bases: ArithmeticBinOperation
Source code in xdsl/dialects/llvm.py
828 829 830 | |
name = 'llvm.xor'
class-attribute
instance-attribute
ShlOp
dataclass
Bases: ArithmeticBinOpOverflow
Source code in xdsl/dialects/llvm.py
833 834 835 | |
name = 'llvm.shl'
class-attribute
instance-attribute
LShrOp
dataclass
Bases: ArithmeticBinOpExact
Source code in xdsl/dialects/llvm.py
838 839 840 | |
name = 'llvm.lshr'
class-attribute
instance-attribute
AShrOp
dataclass
Bases: ArithmeticBinOpExact
Source code in xdsl/dialects/llvm.py
843 844 845 | |
name = 'llvm.ashr'
class-attribute
instance-attribute
TruncOp
dataclass
Bases: IntegerConversionOpOverflow
Source code in xdsl/dialects/llvm.py
848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 | |
name = 'llvm.trunc'
class-attribute
instance-attribute
verify(verify_nested_ops: bool = True)
Source code in xdsl/dialects/llvm.py
852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 | |
ZExtOp
dataclass
Bases: IntegerConversionOpNNeg
Source code in xdsl/dialects/llvm.py
870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 | |
name = 'llvm.zext'
class-attribute
instance-attribute
verify(verify_nested_ops: bool = True)
Source code in xdsl/dialects/llvm.py
874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 | |
SExtOp
dataclass
Bases: IntegerConversionOp
Source code in xdsl/dialects/llvm.py
891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 | |
name = 'llvm.sext'
class-attribute
instance-attribute
verify(verify_nested_ops: bool = True)
Source code in xdsl/dialects/llvm.py
895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 | |
ICmpPredicateFlag
Bases: StrEnum
Source code in xdsl/dialects/llvm.py
912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 | |
EQ = 'eq'
class-attribute
instance-attribute
NE = 'ne'
class-attribute
instance-attribute
SLT = 'slt'
class-attribute
instance-attribute
SLE = 'sle'
class-attribute
instance-attribute
SGT = 'sgt'
class-attribute
instance-attribute
SGE = 'sge'
class-attribute
instance-attribute
ULT = 'ult'
class-attribute
instance-attribute
ULE = 'ule'
class-attribute
instance-attribute
UGT = 'ugt'
class-attribute
instance-attribute
UGE = 'uge'
class-attribute
instance-attribute
from_int(index: int) -> ICmpPredicateFlag
staticmethod
Source code in xdsl/dialects/llvm.py
924 925 926 | |
to_int() -> int
Source code in xdsl/dialects/llvm.py
928 929 | |
ICmpOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 | |
name = 'llvm.icmp'
class-attribute
instance-attribute
T: ClassVar = VarConstraint('T', SignlessIntegerConstraint | VectorType.constr(SignlessIntegerConstraint))
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
res = result_def(I1 | VectorType[I1])
class-attribute
instance-attribute
predicate = prop_def(IntegerAttr[i64])
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(lhs: SSAValue, rhs: SSAValue, predicate: IntegerAttr[IntegerType], attributes: dict[str, Attribute] = {})
Source code in xdsl/dialects/llvm.py
950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 | |
parse(parser: Parser)
classmethod
Source code in xdsl/dialects/llvm.py
972 973 974 975 976 977 978 979 980 981 982 983 | |
print(printer: Printer)
Source code in xdsl/dialects/llvm.py
985 986 987 988 989 990 991 992 993 | |
verify_(verify_nested_ops: bool = True) -> None
Source code in xdsl/dialects/llvm.py
995 996 997 998 999 1000 1001 1002 1003 1004 1005 | |
GEPOp
Bases: IRDLOperation
llvm.getelementptr is an instruction to do pointer arithmetic by adding/subtracting offsets from a pointer.
See external documentation.
GetElementPtr is documented in various places online:
See the LLVM documentation. A good blogpost.
Note that the first two discuss LLVM IRs GEP operation, not the MLIR one. The semantics are the same, but the structure used by MLIR is not well documented (yet) and the syntax is a bit different.
Here we focus on MLIRs GEP operation:
%res = llvm.getelementptr %ptr [1, 2, %val] ^^^^ ^^^^^^^^^^ input indices
The central point to understanding GEP is that:
GEP never dereferences, it only does math on the given pointer
It always returns a pointer to the element "selected" that is some number of bytes offset from the input pointer:
result = ptr + x for some x parametrized by the arguments
Examples:
Given the following pointer:
%ptr : llvm.ptr<llvm.struct<(i32, i32, llvm.array<2xi32>)>>
The following indices point to the following things:
[0] -> The first element of the pointer, so a pointer to the struct: llvm.ptr<llvm.struct<(i32, i32, llvm.array<2xi32>)>>
[1] -> The next element of the pointer, useful if the pointer points to a list of structs. Equivalent to (ptr + 1), so points to llvm.ptr<llvm.struct<(i32, i32, llvm.array<2xi32>)>>
[0,0] -> The first member of the first struct:
llvm.ptr
[1,0] -> The first member of the second struct pointed to by ptr
(can result in out-of-bounds access if the ptr only points to a single struct)
llvm.ptr
[0,2] -> The third member of the first struct. llvm.ptr<llvm.array<2,i32>>
[0,2,0] -> The first entry of the array that is the third member of
the first struct pointed to by our ptr.
llvm.ptr
[0,0,1] -> Invalid! The first element of the first struct has no "sub-elements"!
Here is an example of invalid GEP operation parameters:
Given a different pointer to the example above:
%ptr : llvm.ptr<llvm.struct<(llvm.ptr
Note the two pointers, one to the struct, one in the struct.
We can do math on the first pointer:
[0] -> First struct
llvm.ptr<llvm.struct<(llvm.ptr
[0,1] -> Second member of first struct
llvm.ptr
[0,0] -> First member of the first struct
llvm.ptr
[0,0,3] -> Invalid! In order to find the fourth element in the pointer it would need to be dereferenced! GEP can't do that!
Expressed in "C", this would equate to:
address of first struct
(ptr + 0)
address of first field of first struct
&((ptr + 0)->elm0) ^^^^^^ Even though it looks like it, we are not actually dereferencing ptr here.
address of fourth element:
&(((ptr + 0)->elm0 + 3)) ^^^^^^^^^^ This actually dereferences (ptr + 0) to access elm0!
Which translates to roughly this MLIR code:
%elm0_addr = llvm.gep %ptr[0,0] : (!llvm.ptr<...>) -> !llvm.ptr<!llvm.ptr
Here the necessary dereferencing is very visible, as %elm0_3_addr is only
accessible through an llvm.load on %elm0_addr.
Source code in xdsl/dialects/llvm.py
1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 | |
name = 'llvm.getelementptr'
class-attribute
instance-attribute
ptr = operand_def(LLVMPointerType)
class-attribute
instance-attribute
ssa_indices = var_operand_def(IntegerType)
class-attribute
instance-attribute
elem_type = prop_def()
class-attribute
instance-attribute
noWrapFlags = prop_def(IntegerAttr[I32])
class-attribute
instance-attribute
result = result_def(LLVMPointerType)
class-attribute
instance-attribute
rawConstantIndices = prop_def(DenseArrayBase.constr(i32))
class-attribute
instance-attribute
inbounds = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/llvm.py
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 | |
__init__(ptr: SSAValue | Operation, indices: Sequence[int], pointee_type: Attribute, ssa_indices: Sequence[SSAValue | Operation] | None = None, result_type: LLVMPointerType = LLVMPointerType(), inbounds: bool = False)
A basic constructor for the GEPOp.
Pass the GEP_USE_SSA_VAL magic value in place of each constant index that you want to be read from an SSA value.
Take a look at from_mixed_indices for something without
magic values.
Source code in xdsl/dialects/llvm.py
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 | |
from_mixed_indices(ptr: SSAValue | Operation, indices: Sequence[int | SSAValue | Operation], pointee_type: Attribute, result_type: LLVMPointerType = LLVMPointerType(), inbounds: bool = False)
staticmethod
This is a helper function that accepts a mixed list of SSA values and const indices. It will automatically construct the correct indices and ssa_indices lists from that.
You can call this using [1, 2, some_ssa_val, 3] as the indices array.
Other than that, this behaves exactly the same as .get
Source code in xdsl/dialects/llvm.py
1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 | |
parse(parser: Parser) -> GEPOp
classmethod
Source code in xdsl/dialects/llvm.py
1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 | |
AllocaOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 | |
name = 'llvm.alloca'
class-attribute
instance-attribute
size = operand_def(IntegerType)
class-attribute
instance-attribute
alignment = opt_prop_def(IntegerAttr)
class-attribute
instance-attribute
elem_type = prop_def()
class-attribute
instance-attribute
res = result_def()
class-attribute
instance-attribute
__init__(size: SSAValue | Operation, elem_type: Attribute, alignment: int = 32)
Source code in xdsl/dialects/llvm.py
1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 | |
parse(parser: Parser) -> AllocaOp
classmethod
Source code in xdsl/dialects/llvm.py
1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 | |
IntToPtrOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 | |
name = 'llvm.inttoptr'
class-attribute
instance-attribute
assembly_format = '$input attr-dict `:` type($input) `to` type($output)'
class-attribute
instance-attribute
input = operand_def(IntegerType)
class-attribute
instance-attribute
output = result_def(LLVMPointerType)
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(input: SSAValue | Operation)
Source code in xdsl/dialects/llvm.py
1339 1340 1341 | |
TailCallKind
Bases: StrEnum
Source code in xdsl/dialects/llvm.py
1344 1345 1346 1347 1348 | |
NONE = 'none'
class-attribute
instance-attribute
TAIL = 'tail'
class-attribute
instance-attribute
MUST_TAIL = 'musttail'
class-attribute
instance-attribute
NOTAIL = 'notail'
class-attribute
instance-attribute
TailCallKindAttr
dataclass
Bases: EnumAttribute[TailCallKind]
Source code in xdsl/dialects/llvm.py
1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 | |
name = 'llvm.tailcallkind'
class-attribute
instance-attribute
parse_parameter(parser: AttrParser) -> TailCallKind
classmethod
Source code in xdsl/dialects/llvm.py
1355 1356 1357 1358 | |
print_parameter(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
1360 1361 1362 | |
InlineAsmOp
Bases: IRDLOperation
See external documentation.
To see what each field means, have a look here.
Source code in xdsl/dialects/llvm.py
1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 | |
name = 'llvm.inline_asm'
class-attribute
instance-attribute
operands_ = var_operand_def()
class-attribute
instance-attribute
res = opt_result_def()
class-attribute
instance-attribute
asm_dialect = opt_prop_def(IntegerAttr[I64])
class-attribute
instance-attribute
asm_string = prop_def(StringAttr)
class-attribute
instance-attribute
constraints = prop_def(StringAttr)
class-attribute
instance-attribute
has_side_effects = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
is_align_stack = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
tail_call_kind = prop_def(TailCallKindAttr, default_value=(TailCallKindAttr(TailCallKind.NONE)))
class-attribute
instance-attribute
__init__(asm_string: str, constraints: str, operands: Sequence[SSAValue | Operation], res_types: Sequence[Attribute] | None = None, asm_dialect: int | None = None, has_side_effects: bool = False, is_align_stack: bool = False, tail_call_kind: TailCallKindAttr | None = None)
Source code in xdsl/dialects/llvm.py
1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 | |
parse(parser: Parser) -> InlineAsmOp
classmethod
Source code in xdsl/dialects/llvm.py
1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 | |
PtrToIntOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 | |
name = 'llvm.ptrtoint'
class-attribute
instance-attribute
assembly_format = '$input attr-dict `:` type($input) `to` type($output)'
class-attribute
instance-attribute
input = operand_def(LLVMPointerType)
class-attribute
instance-attribute
output = result_def(IntegerType)
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(arg: SSAValue | Operation, int_type: Attribute = i64)
Source code in xdsl/dialects/llvm.py
1529 1530 | |
LoadOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 | |
name = 'llvm.load'
class-attribute
instance-attribute
ptr = operand_def(LLVMPointerType)
class-attribute
instance-attribute
alignment = opt_prop_def(IntegerAttr[IntegerType])
class-attribute
instance-attribute
ordering = prop_def(IntegerAttr[IntegerType], default_value=(IntegerAttr(0, i64)))
class-attribute
instance-attribute
dereferenced_value = result_def()
class-attribute
instance-attribute
__init__(ptr: SSAValue | Operation, result_type: Attribute, alignment: int | None = None, ordering: int = 0)
Source code in xdsl/dialects/llvm.py
1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 | |
parse(parser: Parser) -> LoadOp
classmethod
Source code in xdsl/dialects/llvm.py
1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 | |
StoreOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 | |
name = 'llvm.store'
class-attribute
instance-attribute
value = operand_def()
class-attribute
instance-attribute
ptr = operand_def(LLVMPointerType)
class-attribute
instance-attribute
alignment = opt_prop_def(IntegerAttr[IntegerType])
class-attribute
instance-attribute
ordering = opt_prop_def(IntegerAttr[IntegerType])
class-attribute
instance-attribute
volatile_ = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
nontemporal = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
__init__(value: SSAValue | Operation, ptr: SSAValue | Operation, alignment: int | None = None, ordering: int = 0, volatile: bool = False, nontemporal: bool = False)
Source code in xdsl/dialects/llvm.py
1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 | |
parse(parser: Parser) -> StoreOp
classmethod
Source code in xdsl/dialects/llvm.py
1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 | |
ExtractValueOp
Bases: IRDLOperation
See external documentation.
Source code in xdsl/dialects/llvm.py
1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 | |
name = 'llvm.extractvalue'
class-attribute
instance-attribute
position = prop_def(DenseArrayBase.constr(i64))
class-attribute
instance-attribute
container = operand_def(Attribute)
class-attribute
instance-attribute
res = result_def(Attribute)
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(position: DenseArrayBase, container: SSAValue | Operation, result_type: Attribute)
Source code in xdsl/dialects/llvm.py
1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
1733 1734 1735 1736 1737 1738 1739 1740 1741 | |
parse(parser: Parser) -> ExtractValueOp
classmethod
Source code in xdsl/dialects/llvm.py
1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 | |
InsertValueOp
Bases: IRDLOperation
See external documentation.
Source code in xdsl/dialects/llvm.py
1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 | |
name = 'llvm.insertvalue'
class-attribute
instance-attribute
position = prop_def(DenseArrayBase.constr(i64))
class-attribute
instance-attribute
container = operand_def(Attribute)
class-attribute
instance-attribute
value = operand_def(Attribute)
class-attribute
instance-attribute
res = result_def(Attribute)
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(position: DenseArrayBase, container: SSAValue, value: SSAValue)
Source code in xdsl/dialects/llvm.py
1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 | |
parse(parser: Parser) -> InsertValueOp
classmethod
Source code in xdsl/dialects/llvm.py
1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 | |
InsertElementOp
Bases: IRDLOperation
See external documentation.
Source code in xdsl/dialects/llvm.py
1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 | |
name = 'llvm.insertelement'
class-attribute
instance-attribute
ELEMENT: ClassVar = VarConstraint('ELEMENT', AnyAttr())
class-attribute
instance-attribute
VECTOR: ClassVar = VarConstraint('VECTOR_T', VectorType.constr(ELEMENT, shape=(ArrayAttr.constr(RangeOf(IntAttr).of_length(1)))))
class-attribute
instance-attribute
vector = operand_def(VECTOR)
class-attribute
instance-attribute
value = operand_def(ELEMENT)
class-attribute
instance-attribute
index = operand_def(SignlessIntegerConstraint)
class-attribute
instance-attribute
res = result_def(VECTOR)
class-attribute
instance-attribute
assembly_format = '$value `,` $vector `[` $index `:` type($index) `]` attr-dict `:` type($vector)'
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(vector: Operation | SSAValue, value: Operation | SSAValue, index: Operation | SSAValue)
Source code in xdsl/dialects/llvm.py
1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 | |
UndefOp
Bases: IRDLOperation
See external documentation.
Source code in xdsl/dialects/llvm.py
1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 | |
name = 'llvm.mlir.undef'
class-attribute
instance-attribute
assembly_format = 'attr-dict `:` type($res)'
class-attribute
instance-attribute
res = result_def(Attribute)
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(result_type: Attribute)
Source code in xdsl/dialects/llvm.py
1897 1898 | |
ShuffleVectorResultConstraint
dataclass
Bases: AttrConstraint[VectorType]
Infers a 1D VectorType result from the input element type and mask length.
The result shape is determined by the number of elements in the mask, while the element type is propagated from the input vectors.
Source code in xdsl/dialects/llvm.py
1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 | |
element_constr: AttrConstraint
instance-attribute
mask_constr: VarConstraint
instance-attribute
__init__(element_constr: AttrConstraint, mask_constr: VarConstraint) -> None
verify(attr: Attribute, constraint_context: ConstraintContext) -> None
Source code in xdsl/dialects/llvm.py
1913 1914 1915 1916 1917 1918 1919 | |
can_infer(var_constraint_names: AbstractSet[str]) -> bool
Source code in xdsl/dialects/llvm.py
1921 1922 1923 1924 1925 | |
infer(context: ConstraintContext) -> VectorType
Source code in xdsl/dialects/llvm.py
1927 1928 1929 1930 1931 1932 | |
mapping_type_vars(type_var_mapping: Mapping[TypeVar, AttrConstraint | IntConstraint]) -> AttrConstraint[VectorType]
Source code in xdsl/dialects/llvm.py
1934 1935 1936 1937 1938 1939 1940 | |
ShuffleVectorOp
Bases: IRDLOperation
Constructs a new 1D vector by selecting elements from two input vectors according to a static mask of indices.
See external documentation.
Source code in xdsl/dialects/llvm.py
1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 | |
name = 'llvm.shufflevector'
class-attribute
instance-attribute
T: ClassVar = VarConstraint('T', AnyAttr())
class-attribute
instance-attribute
VEC_TYPE: ClassVar = VarConstraint('VEC_TYPE', VectorType.constr(T, shape=(ArrayAttr.constr(RangeOf(base(IntAttr)).of_length(1)))))
class-attribute
instance-attribute
MASK: ClassVar = VarConstraint('MASK', irdl_to_attr_constraint(DenseArrayBase[I32]))
class-attribute
instance-attribute
v1 = operand_def(VEC_TYPE)
class-attribute
instance-attribute
v2 = operand_def(VEC_TYPE)
class-attribute
instance-attribute
mask = prop_def(MASK)
class-attribute
instance-attribute
res = result_def(ShuffleVectorResultConstraint(T, MASK))
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
assembly_format = '$v1 `,` $v2 $mask attr-dict `:` type($v1)'
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/llvm.py
1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 | |
__init__(v1: Operation | SSAValue, v2: Operation | SSAValue, mask: DenseArrayBase, result_type: Attribute)
Source code in xdsl/dialects/llvm.py
1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 | |
GlobalOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 | |
name = 'llvm.mlir.global'
class-attribute
instance-attribute
global_type = prop_def()
class-attribute
instance-attribute
constant = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
sym_name = prop_def(SymbolNameConstraint())
class-attribute
instance-attribute
linkage = prop_def(LinkageAttr)
class-attribute
instance-attribute
dso_local = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
thread_local_ = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
visibility_ = opt_prop_def(IntegerAttr[IntegerType])
class-attribute
instance-attribute
value = opt_prop_def()
class-attribute
instance-attribute
alignment = opt_prop_def(IntegerAttr)
class-attribute
instance-attribute
addr_space = prop_def(IntegerAttr)
class-attribute
instance-attribute
unnamed_addr = opt_prop_def(IntegerAttr)
class-attribute
instance-attribute
section = opt_prop_def(StringAttr)
class-attribute
instance-attribute
body = region_def()
class-attribute
instance-attribute
traits = traits_def(SymbolOpInterface())
class-attribute
instance-attribute
__init__(global_type: Attribute, sym_name: str | StringAttr, linkage: str | LinkageAttr, addr_space: int = 0, constant: bool | None = None, dso_local: bool | None = None, thread_local_: bool | None = None, value: Attribute | None = None, alignment: int | None = None, unnamed_addr: int | None = None, section: str | StringAttr | None = None, body: Region | None = None)
Source code in xdsl/dialects/llvm.py
2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 | |
parse(parser: Parser) -> GlobalOp
classmethod
Source code in xdsl/dialects/llvm.py
2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 | |
AddressOfOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 | |
name = 'llvm.mlir.addressof'
class-attribute
instance-attribute
assembly_format = '$global_name attr-dict `:` type($result)'
class-attribute
instance-attribute
global_name = prop_def(SymbolRefAttr)
class-attribute
instance-attribute
result = result_def(LLVMPointerType)
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(global_name: str | StringAttr | SymbolRefAttr, result_type: LLVMPointerType)
Source code in xdsl/dialects/llvm.py
2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 | |
CallingConventionAttr
Bases: ParametrizedAttribute
LLVM Calling convention, default is ccc.
Source code in xdsl/dialects/llvm.py
2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 | |
name = 'llvm.cconv'
class-attribute
instance-attribute
convention: StringAttr
instance-attribute
cconv_name: str
property
__init__(conv: str)
Source code in xdsl/dialects/llvm.py
2243 2244 | |
print_parameters(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
2250 2251 | |
parse_parameters(parser: AttrParser) -> list[Attribute]
classmethod
Source code in xdsl/dialects/llvm.py
2253 2254 2255 2256 2257 2258 2259 2260 | |
FramePointerKind
Bases: StrEnum
Source code in xdsl/dialects/llvm.py
2263 2264 2265 2266 2267 | |
NONE = 'none'
class-attribute
instance-attribute
NONLEAF = 'non-leaf'
class-attribute
instance-attribute
ALL = 'all'
class-attribute
instance-attribute
RESERVED = 'reserved'
class-attribute
instance-attribute
FramePointerKindAttr
dataclass
Bases: EnumAttribute[FramePointerKind]
LLVM Frame Pointer Kind.
Source code in xdsl/dialects/llvm.py
2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 | |
name = 'llvm.framePointerKind'
class-attribute
instance-attribute
print_parameter(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
2276 2277 2278 | |
parse_parameter(parser: AttrParser) -> FramePointerKind
classmethod
Source code in xdsl/dialects/llvm.py
2280 2281 2282 2283 | |
TargetFeaturesAttr
dataclass
Bases: ParametrizedAttribute
Represents the LLVM target features as a list that can be checked within passes/rewrites.
Source code in xdsl/dialects/llvm.py
2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 | |
name = 'llvm.target_features'
class-attribute
instance-attribute
features: ArrayAttr[StringAttr]
instance-attribute
verify()
Source code in xdsl/dialects/llvm.py
2297 2298 2299 2300 | |
FuncOp
Bases: IRDLOperation
LLVM function operation.
Note on property behavior:
- visibility_: always defaults to 0.
- unnamed_addr: always defaults to 0 in custom format. Only printed if explicitly set in generic format.
Source code in xdsl/dialects/llvm.py
2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 | |
name = 'llvm.func'
class-attribute
instance-attribute
body = region_def()
class-attribute
instance-attribute
sym_name = prop_def(SymbolNameConstraint())
class-attribute
instance-attribute
function_type = prop_def(LLVMFunctionType)
class-attribute
instance-attribute
CConv = prop_def(CallingConventionAttr)
class-attribute
instance-attribute
linkage = prop_def(LinkageAttr)
class-attribute
instance-attribute
sym_visibility = opt_prop_def(StringAttr)
class-attribute
instance-attribute
visibility_ = prop_def(IntegerAttr[IntegerType], default_value=(IntegerAttr(0, 64)))
class-attribute
instance-attribute
arg_attrs = opt_prop_def(ArrayAttr[DictionaryAttr])
class-attribute
instance-attribute
res_attrs = opt_prop_def(ArrayAttr[DictionaryAttr])
class-attribute
instance-attribute
frame_pointer = opt_prop_def(FramePointerKindAttr)
class-attribute
instance-attribute
no_inline = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
no_unwind = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
optimize_none = opt_prop_def(UnitAttr)
class-attribute
instance-attribute
passthrough = opt_prop_def(ArrayAttr[Attribute])
class-attribute
instance-attribute
target_cpu = opt_prop_def(StringAttr)
class-attribute
instance-attribute
target_features = opt_prop_def(TargetFeaturesAttr)
class-attribute
instance-attribute
tune_cpu = opt_prop_def(StringAttr)
class-attribute
instance-attribute
unnamed_addr = opt_prop_def(IntegerAttr)
class-attribute
instance-attribute
traits = traits_def(SymbolOpInterface())
class-attribute
instance-attribute
__init__(sym_name: str | StringAttr, function_type: LLVMFunctionType, linkage: LinkageAttr = LinkageAttr('internal'), cconv: CallingConventionAttr = CallingConventionAttr('ccc'), visibility: int | IntegerAttr[IntegerType] = 0, sym_visibility: str | StringAttr | None = None, body: Region | None = None, other_props: dict[str, Attribute | None] | None = None, extra_attrs: Mapping[str, Attribute] | None = None)
Source code in xdsl/dialects/llvm.py
2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 | |
parse(parser: Parser) -> FuncOp
classmethod
Source code in xdsl/dialects/llvm.py
2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 | |
verify_(verify_nested_ops: bool = True) -> None
Source code in xdsl/dialects/llvm.py
2506 2507 2508 2509 2510 2511 2512 2513 2514 | |
print(printer: Printer)
Source code in xdsl/dialects/llvm.py
2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 | |
ReturnOp
Bases: IRDLOperation
See external documentation.
Source code in xdsl/dialects/llvm.py
2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 | |
name = 'llvm.return'
class-attribute
instance-attribute
assembly_format = '($arg^ `:` type($arg))? attr-dict'
class-attribute
instance-attribute
arg = opt_operand_def(Attribute)
class-attribute
instance-attribute
traits = traits_def(IsTerminator(), NoMemoryEffect())
class-attribute
instance-attribute
__init__(value: SSAValue | None = None)
Source code in xdsl/dialects/llvm.py
2565 2566 | |
ConstantOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 | |
name = 'llvm.mlir.constant'
class-attribute
instance-attribute
result = result_def(Attribute)
class-attribute
instance-attribute
value = prop_def(IntegerAttr | FloatAttr | DenseIntOrFPElementsAttr)
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
__init__(value: Attribute, value_type: Attribute)
Source code in xdsl/dialects/llvm.py
2577 2578 | |
parse_value(parser: Parser) -> Attribute
classmethod
Source code in xdsl/dialects/llvm.py
2580 2581 2582 2583 2584 2585 2586 2587 2588 | |
parse(parser: Parser)
classmethod
Source code in xdsl/dialects/llvm.py
2590 2591 2592 2593 2594 2595 2596 2597 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
2599 2600 2601 2602 2603 2604 2605 2606 | |
FastMathAttr
dataclass
Bases: FastMathAttrBase
Source code in xdsl/dialects/llvm.py
2609 2610 2611 | |
name = 'llvm.fastmath'
class-attribute
instance-attribute
CallIntrinsicOp
Bases: IRDLOperation
See external documentation.
Source code in xdsl/dialects/llvm.py
2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 | |
name = 'llvm.call_intrinsic'
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
intrin = prop_def(StringAttr)
class-attribute
instance-attribute
op_bundle_sizes = prop_def(DenseArrayBase.constr(i32), default_value=(DenseArrayBase.from_list(i32, ())))
class-attribute
instance-attribute
args = var_operand_def()
class-attribute
instance-attribute
op_bundle_operands = var_operand_def()
class-attribute
instance-attribute
ress = opt_result_def()
class-attribute
instance-attribute
assembly_format = '$intrin `(` $args `)` (`[` $op_bundle_operands^ `:` type($op_bundle_operands) `]`)? attr-dict `:` functional-type($args, results)'
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True), ParsePropInAttrDict())
class-attribute
instance-attribute
verify_() -> None
Source code in xdsl/dialects/llvm.py
2643 2644 2645 2646 2647 | |
__init__(intrin: StringAttr | str, args: Sequence[SSAValue], result_types: Sequence[Attribute], *, op_bundle_sizes: DenseArrayBase = DenseArrayBase.from_list(i32, ()), op_bundle_operands: Sequence[SSAValue] = ())
Source code in xdsl/dialects/llvm.py
2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 | |
CallOpSymbolUserOpInterface
dataclass
Bases: SymbolUserOpInterface
Verifies that a direct llvm.call resolves to an llvm.func in the enclosing
symbol table. Indirect calls (no callee symbol) are skipped.
Mirrors MLIR's LLVM::CallOp::verifySymbolUses:
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
Source code in xdsl/dialects/llvm.py
2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 | |
verify(op: Operation) -> None
Source code in xdsl/dialects/llvm.py
2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 | |
CallOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 | |
name = 'llvm.call'
class-attribute
instance-attribute
args = var_operand_def()
class-attribute
instance-attribute
op_bundle_operands = var_operand_def()
class-attribute
instance-attribute
callee = opt_prop_def(SymbolRefAttr)
class-attribute
instance-attribute
var_callee_type = opt_prop_def(LLVMFunctionType)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr('none')))
class-attribute
instance-attribute
CConv = prop_def(CallingConventionAttr, default_value=(CallingConventionAttr('ccc')))
class-attribute
instance-attribute
op_bundle_sizes = prop_def(DenseArrayBase.constr(i32), default_value=(DenseArrayBase.from_list(i32, ())))
class-attribute
instance-attribute
TailCallKind = prop_def(TailCallKindAttr, default_value=(TailCallKindAttr(TailCallKind.NONE)))
class-attribute
instance-attribute
returned = opt_result_def()
class-attribute
instance-attribute
traits = traits_def(CallOpSymbolUserOpInterface())
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
__init__(callee: str | SymbolRefAttr | StringAttr, *args: SSAValue | Operation, op_bundle_sizes: DenseArrayBase = DenseArrayBase.from_list(i32, ()), op_bundle_operands: tuple[SSAValue, ...] = (), return_type: Attribute | None = None, calling_convention: CallingConventionAttr = CallingConventionAttr('ccc'), fastmath: FastMathAttr = FastMathAttr(None), variadic_args: int = 0)
Source code in xdsl/dialects/llvm.py
2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 | |
print(printer: Printer) -> None
Source code in xdsl/dialects/llvm.py
2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 | |
parse(parser: Parser) -> CallOp
classmethod
Source code in xdsl/dialects/llvm.py
2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 | |
ZeroOp
dataclass
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
2864 2865 2866 2867 2868 2869 2870 2871 2872 | |
name = 'llvm.mlir.zero'
class-attribute
instance-attribute
assembly_format = 'attr-dict `:` type($res)'
class-attribute
instance-attribute
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
res = result_def(LLVMTypeConstr)
class-attribute
instance-attribute
GenericCastOp
Bases: IRDLOperation, ABC
Source code in xdsl/dialects/llvm.py
2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 | |
arg = operand_def(Attribute)
class-attribute
instance-attribute
LLVM-compatible non-aggregate type
result = result_def(Attribute)
class-attribute
instance-attribute
LLVM-compatible non-aggregate type
traits = traits_def(NoMemoryEffect())
class-attribute
instance-attribute
assembly_format = '$arg attr-dict `:` type($arg) `to` type($result)'
class-attribute
instance-attribute
__init__(val: Operation | SSAValue, res_type: Attribute)
Source code in xdsl/dialects/llvm.py
2890 2891 2892 2893 2894 | |
AbstractFloatArithOp
Bases: IRDLOperation, ABC
Source code in xdsl/dialects/llvm.py
2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
traits = traits_def(Pure(), SameOperandsAndResultType())
class-attribute
instance-attribute
assembly_format = '$lhs `,` $rhs attr-dict `:` type($lhs)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
__init__(lhs: SSAValue | Operation, rhs: SSAValue | Operation, fast_math: FastMathAttr | FastMathFlag | None = None, attrs: dict[str, Attribute] | None = None)
Source code in xdsl/dialects/llvm.py
2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 | |
FAddOp
dataclass
Bases: AbstractFloatArithOp
Source code in xdsl/dialects/llvm.py
2930 2931 2932 | |
name = 'llvm.fadd'
class-attribute
instance-attribute
FMulOp
dataclass
Bases: AbstractFloatArithOp
Source code in xdsl/dialects/llvm.py
2935 2936 2937 | |
name = 'llvm.fmul'
class-attribute
instance-attribute
FDivOp
dataclass
Bases: AbstractFloatArithOp
Source code in xdsl/dialects/llvm.py
2940 2941 2942 | |
name = 'llvm.fdiv'
class-attribute
instance-attribute
FSubOp
dataclass
Bases: AbstractFloatArithOp
Source code in xdsl/dialects/llvm.py
2945 2946 2947 | |
name = 'llvm.fsub'
class-attribute
instance-attribute
FRemOp
dataclass
Bases: AbstractFloatArithOp
Source code in xdsl/dialects/llvm.py
2950 2951 2952 | |
name = 'llvm.frem'
class-attribute
instance-attribute
FCmpPredicateFlag
Bases: StrEnum
Source code in xdsl/dialects/llvm.py
2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 | |
FALSE = '_false'
class-attribute
instance-attribute
OEQ = 'oeq'
class-attribute
instance-attribute
OGT = 'ogt'
class-attribute
instance-attribute
OGE = 'oge'
class-attribute
instance-attribute
OLT = 'olt'
class-attribute
instance-attribute
OLE = 'ole'
class-attribute
instance-attribute
ONE = 'one'
class-attribute
instance-attribute
ORD = 'ord'
class-attribute
instance-attribute
UEQ = 'ueq'
class-attribute
instance-attribute
UGT = 'ugt'
class-attribute
instance-attribute
UGE = 'uge'
class-attribute
instance-attribute
ULT = 'ult'
class-attribute
instance-attribute
ULE = 'ule'
class-attribute
instance-attribute
UNE = 'une'
class-attribute
instance-attribute
UNO = 'uno'
class-attribute
instance-attribute
TRUE = '_true'
class-attribute
instance-attribute
from_int(index: int) -> FCmpPredicateFlag
staticmethod
Source code in xdsl/dialects/llvm.py
2973 2974 2975 | |
to_int() -> int
Source code in xdsl/dialects/llvm.py
2977 2978 | |
FCmpOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 | |
name = 'llvm.fcmp'
class-attribute
instance-attribute
T: ClassVar = VarConstraint('T', AnyFloatConstr)
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
res = result_def(I1)
class-attribute
instance-attribute
predicate = prop_def(IntegerAttr[i64])
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
__init__(lhs: Operation | SSAValue, rhs: Operation | SSAValue, predicate: str | IntegerAttr[IntegerType], attributes: dict[str, Attribute] = {})
Source code in xdsl/dialects/llvm.py
3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 | |
parse(parser: Parser)
classmethod
Source code in xdsl/dialects/llvm.py
3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 | |
print(printer: Printer)
Source code in xdsl/dialects/llvm.py
3033 3034 3035 3036 3037 3038 3039 3040 3041 | |
BitcastOp
dataclass
Bases: GenericCastOp
Source code in xdsl/dialects/llvm.py
3044 3045 3046 | |
name = 'llvm.bitcast'
class-attribute
instance-attribute
SIToFPOp
dataclass
Bases: GenericCastOp
Source code in xdsl/dialects/llvm.py
3049 3050 3051 | |
name = 'llvm.sitofp'
class-attribute
instance-attribute
FPExtOp
dataclass
Bases: GenericCastOp
Source code in xdsl/dialects/llvm.py
3054 3055 3056 | |
name = 'llvm.fpext'
class-attribute
instance-attribute
FAbsOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.fabs'
class-attribute
instance-attribute
input = operand_def(T)
class-attribute
instance-attribute
result = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
__init__(input: Operation | SSAValue, result_type: Attribute, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 | |
FCeilOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.ceil'
class-attribute
instance-attribute
arg = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(arg: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 | |
FSqrtOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.sqrt'
class-attribute
instance-attribute
arg = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(arg: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 | |
FFloorOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.floor'
class-attribute
instance-attribute
arg = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(arg: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 | |
FExp2Op
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.exp2'
class-attribute
instance-attribute
arg = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(arg: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 | |
FLogOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.log'
class-attribute
instance-attribute
arg = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(arg: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 | |
FExpOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.exp'
class-attribute
instance-attribute
arg = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(arg: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 | |
FSinOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.sin'
class-attribute
instance-attribute
arg = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(arg: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 | |
FCosOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.cos'
class-attribute
instance-attribute
arg = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(arg: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 | |
FLog2Op
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.log2'
class-attribute
instance-attribute
arg = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(arg: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 | |
FNegOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.fneg'
class-attribute
instance-attribute
arg = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
traits = traits_def(Pure(), SameOperandsAndResultType())
class-attribute
instance-attribute
assembly_format = '$arg attr-dict `:` type($arg)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
__init__(arg: Operation | SSAValue, fast_math: FastMathAttr | None = None)
Source code in xdsl/dialects/llvm.py
3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 | |
MaskedStoreOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 | |
name = 'llvm.intr.masked.store'
class-attribute
instance-attribute
value = operand_def(VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
data = operand_def(LLVMPointerType)
class-attribute
instance-attribute
mask = operand_def(VectorType[I1])
class-attribute
instance-attribute
alignment = prop_def(IntegerAttr[i32])
class-attribute
instance-attribute
assembly_format = '$value `,` $data `,` $mask attr-dict `:` type($value) `,` type($mask) `into` type($data)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
__init__(value: Operation | SSAValue, data: Operation | SSAValue, mask: Operation | SSAValue, alignment: int = 32)
Source code in xdsl/dialects/llvm.py
3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 | |
SelectOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 | |
name = 'llvm.select'
class-attribute
instance-attribute
T: ClassVar = VarConstraint('T', AnyAttr())
class-attribute
instance-attribute
cond = operand_def(I1)
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
assembly_format = '$cond `,` $lhs `,` $rhs attr-dict `:` type($cond) `,` type($res)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
__init__(cond: Operation | SSAValue, lhs: Operation | SSAValue, rhs: Operation | SSAValue)
Source code in xdsl/dialects/llvm.py
3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 | |
BrOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 | |
name = 'llvm.br'
class-attribute
instance-attribute
arguments = var_operand_def()
class-attribute
instance-attribute
successor = successor_def()
class-attribute
instance-attribute
traits = traits_def(IsTerminator())
class-attribute
instance-attribute
assembly_format = '$successor (`(` $arguments^ `:` type($arguments) `)`)? attr-dict'
class-attribute
instance-attribute
__init__(dest: Block, *ops: Operation | SSAValue)
Source code in xdsl/dialects/llvm.py
3494 3495 | |
CondBrOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 | |
name = 'llvm.cond_br'
class-attribute
instance-attribute
cond = operand_def(IntegerType(1))
class-attribute
instance-attribute
then_arguments = var_operand_def()
class-attribute
instance-attribute
else_arguments = var_operand_def()
class-attribute
instance-attribute
irdl_options = (AttrSizedOperandSegments(as_property=True),)
class-attribute
instance-attribute
then_block = successor_def()
class-attribute
instance-attribute
else_block = successor_def()
class-attribute
instance-attribute
traits = traits_def(IsTerminator())
class-attribute
instance-attribute
assembly_format = '$cond `,` $then_block (`(` $then_arguments^ `:` type($then_arguments) `)`)? `,` $else_block (`(` $else_arguments^ `:` type($else_arguments) `)`)? attr-dict'
class-attribute
instance-attribute
__init__(cond: Operation | SSAValue, then_block: Block, then_ops: Sequence[Operation | SSAValue], else_block: Block, else_ops: Sequence[Operation | SSAValue])
Source code in xdsl/dialects/llvm.py
3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 | |
VectorFMaxOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.maxnum'
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(lhs: Operation | SSAValue, rhs: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 | |
FCopySignOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.copysign'
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(lhs: Operation | SSAValue, rhs: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 | |
FMAOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.fma'
class-attribute
instance-attribute
a = operand_def(T)
class-attribute
instance-attribute
b = operand_def(T)
class-attribute
instance-attribute
c = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(a: Operation | SSAValue, b: Operation | SSAValue, c: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 | |
VectorFMinOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.minnum'
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(lhs: Operation | SSAValue, rhs: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 | |
FPowOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr | VectorType.constr(AnyFloatConstr))
class-attribute
instance-attribute
name = 'llvm.intr.pow'
class-attribute
instance-attribute
lhs = operand_def(T)
class-attribute
instance-attribute
rhs = operand_def(T)
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
assembly_format = '`(` operands `)` attr-dict `:` functional-type(operands, results)'
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(lhs: Operation | SSAValue, rhs: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 | |
StackSaveOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 | |
name = 'llvm.intr.stacksave'
class-attribute
instance-attribute
res = result_def(LLVMPointerType)
class-attribute
instance-attribute
assembly_format = 'attr-dict `:` type($res)'
class-attribute
instance-attribute
__init__()
Source code in xdsl/dialects/llvm.py
3719 3720 | |
VectorReduceOperation
Bases: IRDLOperation, ABC
Source code in xdsl/dialects/llvm.py
3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 | |
T: ClassVar = VarConstraint('T', AnyFloatConstr)
class-attribute
instance-attribute
start_value = operand_def(T)
class-attribute
instance-attribute
vector = operand_def(VectorType.constr(T))
class-attribute
instance-attribute
res = result_def(T)
class-attribute
instance-attribute
fastmathFlags = prop_def(FastMathAttr, default_value=(FastMathAttr(None)))
class-attribute
instance-attribute
irdl_options = (ParsePropInAttrDict(),)
class-attribute
instance-attribute
traits = traits_def(Pure())
class-attribute
instance-attribute
__init__(start_value: Operation | SSAValue, vector: Operation | SSAValue, fast_math: FastMathAttr | FastMathFlag | None = None)
Source code in xdsl/dialects/llvm.py
3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 | |
VectorReduceFAddOp
dataclass
Bases: VectorReduceOperation
Source code in xdsl/dialects/llvm.py
3751 3752 3753 | |
name = 'llvm.intr.vector.reduce.fadd'
class-attribute
instance-attribute
VectorReduceFMulOp
dataclass
Bases: VectorReduceOperation
Source code in xdsl/dialects/llvm.py
3756 3757 3758 | |
name = 'llvm.intr.vector.reduce.fmul'
class-attribute
instance-attribute
StackRestoreOp
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 | |
name = 'llvm.intr.stackrestore'
class-attribute
instance-attribute
ptr = operand_def(LLVMPointerType)
class-attribute
instance-attribute
assembly_format = '$ptr attr-dict `:` type($ptr)'
class-attribute
instance-attribute
__init__(ptr: Operation | SSAValue)
Source code in xdsl/dialects/llvm.py
3769 3770 | |
UnreachableOp
dataclass
Bases: IRDLOperation
Source code in xdsl/dialects/llvm.py
3773 3774 3775 3776 3777 3778 | |
name = 'llvm.unreachable'
class-attribute
instance-attribute
traits = traits_def(IsTerminator())
class-attribute
instance-attribute
assembly_format = 'attr-dict'
class-attribute
instance-attribute
parse_llvm_type(parser: AttrParser) -> Attribute
Source code in xdsl/dialects/llvm.py
130 131 132 133 | |
parse_optional_llvm_type(parser: AttrParser) -> Attribute | None
Source code in xdsl/dialects/llvm.py
136 137 138 139 | |
is_compatible_type(type_attr: Attribute) -> bool
Check if a type is compatible with the LLVM dialect.
Matches MLIR's LLVMDialect::isCompatibleType: signless integers, floats, LLVM dialect types, and 1-D fixed vectors of compatible element types.
Source code in xdsl/dialects/llvm.py
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | |