Struct rustc_mir::transform::coverage::graph::CoverageGraph[−][src]

pub(super) struct CoverageGraph {
    bcbs: IndexVec<BasicCoverageBlock, BasicCoverageBlockData>,
    bb_to_bcb: IndexVec<BasicBlock, Option<BasicCoverageBlock>>,
    pub successors: IndexVec<BasicCoverageBlock, Vec<BasicCoverageBlock>>,
    pub predecessors: IndexVec<BasicCoverageBlock, Vec<BasicCoverageBlock>>,
    dominators: Option<Dominators<BasicCoverageBlock>>,
}
Expand description

A coverage-specific simplification of the MIR control flow graph (CFG). The CoverageGraphs nodes are BasicCoverageBlocks, which encompass one or more MIR BasicBlocks, plus a CoverageKind counter (to be added by CoverageCounters::make_bcb_counters), and an optional set of additional counters–if needed–to count incoming edges, if there are more than one. (These “edge counters” are eventually converted into new MIR BasicBlocks.)

Fields

bcbs: IndexVec<BasicCoverageBlock, BasicCoverageBlockData>bb_to_bcb: IndexVec<BasicBlock, Option<BasicCoverageBlock>>successors: IndexVec<BasicCoverageBlock, Vec<BasicCoverageBlock>>predecessors: IndexVec<BasicCoverageBlock, Vec<BasicCoverageBlock>>dominators: Option<Dominators<BasicCoverageBlock>>

Implementations

impl CoverageGraph[src]

Trait Implementations

impl Debug for CoverageGraph[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl DirectedGraph for CoverageGraph[src]

impl<'graph> GraphPredecessors<'graph> for CoverageGraph[src]

impl<'graph> GraphSuccessors<'graph> for CoverageGraph[src]

impl Index<BasicCoverageBlock> for CoverageGraph[src]

type Output = BasicCoverageBlockData

The returned type after indexing.

fn index(&self, index: BasicCoverageBlock) -> &BasicCoverageBlockData[src]

Performs the indexing (container[index]) operation. Read more

impl IndexMut<BasicCoverageBlock> for CoverageGraph[src]

fn index_mut(
    &mut self,
    index: BasicCoverageBlock
) -> &mut BasicCoverageBlockData
[src]

Performs the mutable indexing (container[index]) operation. Read more

impl WithNumNodes for CoverageGraph[src]

fn num_nodes(&self) -> usize[src]

impl WithPredecessors for CoverageGraph[src]

fn predecessors(
    &self,
    node: Self::Node
) -> <CoverageGraph as GraphPredecessors<'_>>::Iter
[src]

impl WithStartNode for CoverageGraph[src]

fn start_node(&self) -> Self::Node[src]

impl WithSuccessors for CoverageGraph[src]

fn successors(
    &self,
    node: Self::Node
) -> <CoverageGraph as GraphSuccessors<'_>>::Iter
[src]

Auto Trait Implementations

impl RefUnwindSafe for CoverageGraph

impl Send for CoverageGraph

impl Sync for CoverageGraph

impl Unpin for CoverageGraph

impl UnwindSafe for CoverageGraph

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> WithConstness for T[src]

fn with_constness(self, constness: Constness) -> ConstnessAnd<Self>[src]

fn with_const(self) -> ConstnessAnd<Self>[src]

fn without_const(self) -> ConstnessAnd<Self>[src]