bloqade.lanes.rewrite.stackify.stackify
← Module overview
function
source
functionstackify¶source
bloqade.lanes.rewrite.stackify.stackify
def stackify(method: ir.Method) -> NoneNormalise a single-block stack_move ir.Method for bytecode encoding.
Applies all three stackification sub-passes in sequence (CloneConstants,
DCE, Dup/Swap insertion) so that dump_program can walk the block in
statement order and emit correct bytecode.
Raises ValueError if the method contains more than one block. All IR
produced by the current compiler pipeline is single-block; call this
function after RewriteMoveToStackMove and before dump_program.
Parameters
| Name | Type | Description |
|---|---|---|
method | ir.Method |