[−][src]Struct rustc_mir::transform::coverage::graph::CoverageGraph
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]
pub fn from_mir<'tcx>(mir_body: &Body<'tcx>) -> Self[src]
pub(in transform::coverage::graph) fn compute_basic_coverage_blocks<'tcx>(
mir_body: &Body<'tcx>
) -> (IndexVec<BasicCoverageBlock, BasicCoverageBlockData>, IndexVec<BasicBlock, Option<BasicCoverageBlock>>)[src]
mir_body: &Body<'tcx>
) -> (IndexVec<BasicCoverageBlock, BasicCoverageBlockData>, IndexVec<BasicBlock, Option<BasicCoverageBlock>>)
pub(in transform::coverage::graph) fn add_basic_coverage_block(
bcbs: &mut IndexVec<BasicCoverageBlock, BasicCoverageBlockData>,
bb_to_bcb: &mut IndexVec<BasicBlock, Option<BasicCoverageBlock>>,
basic_blocks: Vec<BasicBlock>
)[src]
bcbs: &mut IndexVec<BasicCoverageBlock, BasicCoverageBlockData>,
bb_to_bcb: &mut IndexVec<BasicBlock, Option<BasicCoverageBlock>>,
basic_blocks: Vec<BasicBlock>
)
pub fn iter_enumerated(
&self
) -> impl Iterator<Item = (BasicCoverageBlock, &BasicCoverageBlockData)>[src]
&self
) -> impl Iterator<Item = (BasicCoverageBlock, &BasicCoverageBlockData)>
pub fn iter_enumerated_mut(
&mut self
) -> impl Iterator<Item = (BasicCoverageBlock, &mut BasicCoverageBlockData)>[src]
&mut self
) -> impl Iterator<Item = (BasicCoverageBlock, &mut BasicCoverageBlockData)>
pub fn bcb_from_bb(&self, bb: BasicBlock) -> Option<BasicCoverageBlock>[src]
pub fn is_dominated_by(
&self,
node: BasicCoverageBlock,
dom: BasicCoverageBlock
) -> bool[src]
&self,
node: BasicCoverageBlock,
dom: BasicCoverageBlock
) -> bool
pub fn dominators(&self) -> &Dominators<BasicCoverageBlock>[src]
Trait Implementations
impl Debug for CoverageGraph[src]
impl DirectedGraph for CoverageGraph[src]
type Node = BasicCoverageBlock
impl<'graph> GraphPredecessors<'graph> for CoverageGraph[src]
type Item = BasicCoverageBlock
type Iter = IntoIter<BasicCoverageBlock>
impl<'graph> GraphSuccessors<'graph> for CoverageGraph[src]
type Item = BasicCoverageBlock
type Iter = Cloned<Iter<'graph, BasicCoverageBlock>>
impl Index<BasicCoverageBlock> for CoverageGraph[src]
type Output = BasicCoverageBlockData
The returned type after indexing.
pub fn index(&self, index: BasicCoverageBlock) -> &BasicCoverageBlockData[src]
impl IndexMut<BasicCoverageBlock> for CoverageGraph[src]
pub fn index_mut(
&mut self,
index: BasicCoverageBlock
) -> &mut BasicCoverageBlockData[src]
&mut self,
index: BasicCoverageBlock
) -> &mut BasicCoverageBlockData
impl WithNumNodes for CoverageGraph[src]
impl WithPredecessors for CoverageGraph[src]
pub fn predecessors(&self, node: Self::Node) -> Self::Iter[src]
impl WithStartNode for CoverageGraph[src]
pub fn start_node(&self) -> Self::Node[src]
impl WithSuccessors for CoverageGraph[src]
pub fn successors(&self, node: Self::Node) -> Self::Iter[src]
pub fn depth_first_search(&self, from: Self::Node) -> DepthFirstSearch<'_, Self> where
Self: WithNumNodes, [src]
Self: WithNumNodes,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.