bloqade.lanes.rewrite.stackify.CloneConstants
← Module overview
class
method
source
classCloneConstants¶source
bloqade.lanes.rewrite.stackify.CloneConstants
Bases: RewriteRule
Clone ``ConstantLike`` (``Const*``) args to be immediately before their consumer.
class CloneConstantsStack discipline: for a consumer with args [a0, ..., aN] where index 0
is the top of the stack and index N is the deepest, the defining statement
of aN must be emitted first and a0 last. This rule iterates args
from highest index to lowest; each insert_before(node) call places the
new clone right before the consumer, so successive insertions build up:
[clone_N, ..., clone_0, consumer].
methodrewrite_Statement¶source
bloqade.lanes.rewrite.stackify.CloneConstants.rewrite_Statement
def rewrite_Statement(node: ir.Statement) -> RewriteResultParameters
| Name | Type | Description |
|---|---|---|
node | ir.Statement |
Returns
RewriteResult