kirin.rewrite.compactify.CFGCompactify
← Module overview
class
method
source
classCFGCompactify¶source
kirin.rewrite.compactify.CFGCompactify
Bases: RewriteRule
Compactify the CFG by removing dead blocks and merging blocks if the statement uses the SSACFG convention. Do nothing if given `ir.Region` or `ir.Block` due to no context of the region.
class CFGCompactifyTo compactify hierarchical CFG, combine this rule with kirin.rewrite.Walk
to recursively apply this rule to all statements.
methodrewrite_Statement¶source
kirin.rewrite.compactify.CFGCompactify.rewrite_Statement
def rewrite_Statement(node: ir.Statement) -> RewriteResultParameters
| Name | Type | Description |
|---|---|---|
node | ir.Statement |
Returns
RewriteResult