Snitch allocate registers
snitch_allocate_registers
AllocateSnitchStreamingRegionRegisters
Bases: RewritePattern
Allocates the registers in the body of a snitch_stream.streaming_region operation by
assigning them to the ones specified by the streams.
Source code in xdsl/transforms/snitch_allocate_registers.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
match_and_rewrite(op: snitch_stream.StreamingRegionOp, rewriter: PatternRewriter)
Source code in xdsl/transforms/snitch_allocate_registers.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
AllocateRiscvSnitchReadRegisters
Bases: RewritePattern
Propagates the register allocation done at the stream level to the values read from the streams.
Source code in xdsl/transforms/snitch_allocate_registers.py
43 44 45 46 47 48 49 50 51 52 53 54 | |
match_and_rewrite(op: riscv_snitch.ReadOp, rewriter: PatternRewriter)
Source code in xdsl/transforms/snitch_allocate_registers.py
49 50 51 52 53 54 | |
AllocateRiscvSnitchWriteRegisters
Bases: RewritePattern
Propagates the register allocation done at the stream level to the values written to the streams.
Source code in xdsl/transforms/snitch_allocate_registers.py
57 58 59 60 61 62 63 64 65 66 67 68 | |
match_and_rewrite(op: riscv_snitch.WriteOp, rewriter: PatternRewriter)
Source code in xdsl/transforms/snitch_allocate_registers.py
63 64 65 66 67 68 | |
SnitchAllocateRegistersPass
dataclass
Bases: ModulePass
Allocates unallocated registers for snitch operations.
Source code in xdsl/transforms/snitch_allocate_registers.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
name = 'snitch-allocate-registers'
class-attribute
instance-attribute
__init__() -> None
apply(ctx: Context, op: ModuleOp) -> None
Source code in xdsl/transforms/snitch_allocate_registers.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |