Convert scf to x86 scf
convert_scf_to_x86_scf
ScfForLowering
dataclass
Bases: RewritePattern
Source code in xdsl/transforms/convert_scf_to_x86_scf.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
arch: Arch
instance-attribute
__init__(arch: Arch) -> None
match_and_rewrite(op: scf.ForOp, rewriter: PatternRewriter) -> None
Source code in xdsl/transforms/convert_scf_to_x86_scf.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
ScfYieldLowering
dataclass
Bases: RewritePattern
Source code in xdsl/transforms/convert_scf_to_x86_scf.py
77 78 79 80 81 82 83 84 85 | |
arch: Arch
instance-attribute
__init__(arch: Arch) -> None
match_and_rewrite(op: scf.YieldOp, rewriter: PatternRewriter) -> None
Source code in xdsl/transforms/convert_scf_to_x86_scf.py
81 82 83 84 85 | |
ConvertScfToX86ScfPass
dataclass
Bases: ModulePass
Source code in xdsl/transforms/convert_scf_to_x86_scf.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
name = 'convert-scf-to-x86-scf'
class-attribute
instance-attribute
arch: str = field(default='unknown')
class-attribute
instance-attribute
__init__(arch: str = 'unknown') -> None
apply(ctx: Context, op: builtin.ModuleOp) -> None
Source code in xdsl/transforms/convert_scf_to_x86_scf.py
94 95 96 97 98 99 100 101 102 103 | |
cast_block_args_to_regs(block: Block, arch: Arch, rewriter: PatternRewriter)
Change the type of the block arguments to registers and add cast operations just after the block entry.
Source code in xdsl/transforms/convert_scf_to_x86_scf.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |