bloqade.lanes.rewrite.circuit2place.HoistConstants
← Module overview
class
method
sourcemethod
source
classHoistConstants¶source
bloqade.lanes.rewrite.circuit2place.HoistConstants
Bases: abc.RewriteRule
This rewrite rule hoists all constant values to the top of the kernel.
class HoistConstantsmethodis_pure¶source
bloqade.lanes.rewrite.circuit2place.HoistConstants.is_pure
def is_pure(node: ir.Statement) -> boolParameters
| Name | Type | Description |
|---|---|---|
node | ir.Statement |
Returns
bool
methodrewrite_Statement¶source
bloqade.lanes.rewrite.circuit2place.HoistConstants.rewrite_Statement
def rewrite_Statement(node: ir.Statement) -> abc.RewriteResultParameters
| Name | Type | Description |
|---|---|---|
node | ir.Statement |
Returns
abc.RewriteResult