NodeFlowData in rustc_mir_transform::coverage::counters::node_flow - Rust (original) (raw)
Struct NodeFlowData
pub(crate) struct NodeFlowData<Node>
where
Node: Idx,
{
pub supernodes: IndexVec<Node, Node>,
pub succ_supernodes: IndexVec<Node, Node>,
}
Expand description
Data representing a view of some underlying graph, in which each node’s successors have been merged into a single “supernode”.
The resulting supernodes have no obvious meaning on their own. However, merging successor nodes means that a node’s out-edges can all be combined into a single out-edge, whose flow is the same as the flow (execution count) of its corresponding node in the original graph.
With all node flows now in the original graph now represented as edge flows in the merged graph, it becomes possible to analyze the original node flows using techniques for analyzing edge flows.
Maps each node to the supernode that contains it, indicated by some arbitrary “root” node that is part of that supernode.
For each node, stores the single supernode that all of its successors have been merged into.
(Note that each node in a supernode can potentially have a _different_successor supernode from its peers.)
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes