Module spirt::cfg

source ·
Expand description

Control-flow graph (CFG) abstractions and utilities.

Modules§

Structs§

  • The control-flow graph (CFG) of a function, as control-flow instructions (ControlInsts) attached to ControlRegions, 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 its accumulated_count to reach the full count of its target, before it can grafted into some structured control-flow region.
  • Set of DeferredEdgeBundles, uniquely keyed by their targets.
  • An “(incoming) edge bundle” is a subset of the edges into a single target.
  • LoopFinder 🔒
    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 smaller ControlRegions, 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§