bloqade.rewrite.rules.split_ifs.LiftThenBody
← Module overview
class
method
source
classLiftThenBody¶source
bloqade.rewrite.rules.split_ifs.LiftThenBody
Bases: RewriteRule
Lifts anything that's not in the `exclude_stmts` in the *then* body
Signature
class LiftThenBody(exclude_stmts: tuple[type[ir.Statement], ...] = tuple())Parameters
| Name | Type | Default | Description |
|---|---|---|---|
exclude_stmts | tuple[type[ir.Statement], ...] | tuple() | A tuple of statement types that should not be lifted from the then body. Defaults to an empty tuple, meaning all statements are lifted. |
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
exclude_stmts | tuple[type[ir.Statement], ...] | field(default_factory=tuple) |
methodrewrite_Statement¶source
bloqade.rewrite.rules.split_ifs.LiftThenBody.rewrite_Statement
def rewrite_Statement(node: ir.Statement) -> RewriteResultParameters
| Name | Type | Description |
|---|---|---|
node | ir.Statement |
Returns
RewriteResult