Skip to content

bloqade.lanes.rewrite.split_static_placement.SplitStaticPlacement

← Module overview

classSplitStaticPlacementsource

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

NameTypeDescription
split_policyCallable[[ir.Block], list[ir.Block]]

Attributes

NameTypeDescription
split_policyCallable[[ir.Block], list[ir.Block]]

methodrewrite_Statementsource

bloqade.lanes.rewrite.split_static_placement.SplitStaticPlacement.rewrite_Statement

def rewrite_Statement(node: ir.Statement) -> abc.RewriteResult

Parameters

NameTypeDescription
nodeir.Statement

Returns

abc.RewriteResult

source