bloqade.lanes.rewrite.split_static_placement.SplitStaticPlacement
← Module overview
class
method
source
classSplitStaticPlacement¶source
bloqade.lanes.rewrite.split_static_placement.SplitStaticPlacement
Bases: abc.RewriteRule
Split a StaticPlacement body into multiple StaticPlacement statements.
Signature
class SplitStaticPlacement(split_policy: Callable[[ir.Block], list[ir.Block]])The policy receives the body block (with its fully-threaded state chain) and returns a list of new blocks. Each block becomes one StaticPlacement. If the policy returns ≤1 block the rewriter is a no-op.
The policy is responsible for state threading: each output block must start with a block argument of StateType and end with place.Yield. The last block must carry the classical results from the original Yield.
Parameters
| Name | Type | Description |
|---|---|---|
split_policy | Callable[[ir.Block], list[ir.Block]] |
Attributes
| Name | Type | Description |
|---|---|---|
split_policy | Callable[[ir.Block], list[ir.Block]] |
methodrewrite_Statement¶source
bloqade.lanes.rewrite.split_static_placement.SplitStaticPlacement.rewrite_Statement
def rewrite_Statement(node: ir.Statement) -> abc.RewriteResultParameters
| Name | Type | Description |
|---|---|---|
node | ir.Statement |
Returns
abc.RewriteResult