bloqade.lanes.bytecode.encode.dump_program
← Module overview
function
source
functiondump_program¶source
bloqade.lanes.bytecode.encode.dump_program
Signature
def dump_program(method: ir.Method, version: tuple[int, int] = (1, 0)) -> ProgramEncode a stack_move ir.Method into a bytecode Program.
Inverse of load_program in decode.py:
load_program(dump_program(method)) round-trips through bytecode
and back to an equivalent ir.Method.
The method must be stack-consistent (each SSA value used exactly
once, defining statements in stack order). load_program always
produces stack-consistent output; IR from compiler rewrites must be
normalised by stackify before calling this function.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
method | ir.Method | required | |
version | tuple[int, int] | (1, 0) |
Returns
Program