Expand description
Control-flow graph (CFG) abstractions and utilities.
Modules§
- sealed 🔒
Structs§
- The control-flow graph (CFG) of a function, as control-flow instructions (
ControlInst
s) attached toControlRegion
s, as an “action on exit”, i.e. “terminator” (while intra-region control-flow is strictly structured). - A “deferred (incoming) edge bundle” is an
IncomingEdgeBundle
that cannot be structurized immediately, but instead waits for itsaccumulated_count
to reach the full count of itstarget
, before it can grafted into some structured control-flow region. - Set of
DeferredEdgeBundle
s, uniquely keyed by theirtarget
s. - An “(incoming) edge bundle” is a subset of the edges into a single
target
. - Minimal loop analysis, based on Tarjan’s SCC (strongly connected components) algorithm, applied recursively (for every level of loop nesting).
- Partially structurized
ControlRegion
, the result of combining together several smallerControlRegion
s, based on CFG edges between them. - Control-flow “structurizer”, which attempts to convert as much of the CFG as possible into structural control-flow (regions).
Enums§
- A target for one of the edge bundles in a
DeferredEdgeBundleSet
, mostly separate fromControlRegion
to allow expressing returns as well. - LazyCond 🔒A recipe for computing a control-flow-sensitive (boolean) condition
Value
, potentially requiring merging through an arbitrary number ofSelect
s (via per-case outputs andValue::ControlNodeOutput
, for eachSelect
). - SccState 🔒
- The state of one
structurize_region_from
invocation (keyed on its startControlRegion
inStructurizer
) and itsPartialControlRegion
output.