bloqade.lanes.rewrite.stack_move2move
stack_move2move¶
bloqade.lanes.rewrite.stack_move2move
stack_move2move — in-place rewrite from stack_move → multi-dialect IR.
Extends Kirin’s RewriteRule with a rewrite_Block handler that walks the block’s statements once and, for each stack_move statement, inserts the corresponding target-dialect statement(s) via insert_before and deletes the original. State threading is woven in along the way: move.Load at block start initialises the StateType SSA value, each stateful move.* op consumes the current state and produces a new one, and move.Store + func.Return close out the block.
Follows the same pattern as python/bloqade/lanes/rewrite/state.py’s RewriteLoadStore.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
T | — | TypeVar('T') |
View bloqade.lanes.rewrite.stack_move2move.RewriteStackMoveToMove →View bloqade.lanes.rewrite.stack_move2move.RewriteStackMoveToMove.arch_spec →View bloqade.lanes.rewrite.stack_move2move.RewriteStackMoveToMove.ssa_to_attr →View bloqade.lanes.rewrite.stack_move2move.RewriteStackMoveToMove.state →View bloqade.lanes.rewrite.stack_move2move.RewriteStackMoveToMove.rewrite_Block →