Assembly printer
assembly_printer
AssemblyPrinter
dataclass
Bases: BasePrinter
Source code in xdsl/backend/assembly_printer.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
emit_section(new_section: str)
Source code in xdsl/backend/assembly_printer.py
14 15 16 17 18 19 | |
append_comment(line: str, comment: StringAttr | None) -> str
staticmethod
Source code in xdsl/backend/assembly_printer.py
21 22 23 24 25 26 27 28 | |
assembly_line(name: str, arg_str: str, comment: StringAttr | None = None, is_indented: bool = True) -> str
staticmethod
Source code in xdsl/backend/assembly_printer.py
30 31 32 33 34 35 36 37 38 39 40 41 42 | |
print_module(module: ModuleOp) -> None
Source code in xdsl/backend/assembly_printer.py
44 45 46 47 | |
AssemblyPrintable
dataclass
Bases: Operation, ABC
Base class for operations that can be a part of assembly printing.
Source code in xdsl/backend/assembly_printer.py
50 51 52 53 54 55 56 57 | |
print_assembly(printer: AssemblyPrinter) -> None
abstractmethod
Source code in xdsl/backend/assembly_printer.py
55 56 57 | |
OneLineAssemblyPrintable
dataclass
Bases: AssemblyPrintable, ABC
Base class for operations that can be printed in one line of assembly, or not printed at all.
Source code in xdsl/backend/assembly_printer.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
assembly_line() -> str | None
abstractmethod
Returns the line that should be printed in assembly, or None to not be
printed.
Source code in xdsl/backend/assembly_printer.py
66 67 68 69 70 71 72 | |
print_assembly(printer: AssemblyPrinter) -> None
Source code in xdsl/backend/assembly_printer.py
74 75 76 77 78 | |
reg(value: SSAValue) -> str
A wrapper around SSAValue to be printed in assembly. Only valid if the type of the value is a RegisterType.
Source code in xdsl/backend/assembly_printer.py
84 85 86 87 88 89 90 91 | |