CoverageGraph in rustc_mir_transform::coverage::graph - Rust (original) (raw)
Struct CoverageGraph
pub(crate) struct CoverageGraph {
bcbs: IndexVec<BasicCoverageBlock, BasicCoverageBlockData>,
bb_to_bcb: IndexVec<BasicBlock, Option<BasicCoverageBlock>>,
pub(crate) successors: IndexVec<BasicCoverageBlock, Vec<BasicCoverageBlock>>,
pub(crate) predecessors: IndexVec<BasicCoverageBlock, Vec<BasicCoverageBlock>>,
dominators: Option<Dominators<BasicCoverageBlock>>,
dominator_order_rank: IndexVec<BasicCoverageBlock, u32>,
is_loop_header: DenseBitSet<BasicCoverageBlock>,
enclosing_loop_header: IndexVec<BasicCoverageBlock, Option<BasicCoverageBlock>>,
}
Expand description
A coverage-specific simplification of the MIR control flow graph (CFG). The CoverageGraph
s nodes are BasicCoverageBlock
s, which encompass one or more MIR BasicBlock
s.
Allows nodes to be compared in some total order such that if a
dominates b
, then a < b
. If neither node dominates the other, their relative order is consistent but arbitrary.
A loop header is a node that dominates one or more of its predecessors.
For each node, the loop header node of its nearest enclosing loop. This forms a linked list that can be traversed to find all enclosing loops.
For the given node, yields the subset of its predecessor nodes that it dominates. If that subset is non-empty, the node is a “loop header”, and each of those predecessors represents an in-edge that jumps back to the top of its loop.
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: 224 bytes