pub struct Results<'tcx, A, E = IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>>where
    A: Analysis<'tcx>,{
    pub analysis: A,
    pub(super) entry_sets: E,
    pub(super) _marker: PhantomData<&'tcx ()>,
}
Expand description

A dataflow analysis that has converged to fixpoint.

Fields§

§analysis: A§entry_sets: E§_marker: PhantomData<&'tcx ()>

Implementations§

source§

impl<'tcx, A, E> Results<'tcx, A, E>where A: Analysis<'tcx>, E: Borrow<IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>>,

source

pub fn into_results_cursor<'mir>( self, body: &'mir Body<'tcx> ) -> ResultsCursor<'mir, 'tcx, A, Self>

Creates a ResultsCursor that can inspect these Results.

source

pub fn entry_set_for_block(&self, block: BasicBlock) -> &A::Domain

Gets the dataflow state for the given block.

source

pub fn visit_with<'mir>( &mut self, body: &'mir Body<'tcx>, blocks: impl IntoIterator<Item = BasicBlock>, vis: &mut impl ResultsVisitor<'mir, 'tcx, Self, FlowState = A::Domain> )

source

pub fn visit_reachable_with<'mir>( &mut self, body: &'mir Body<'tcx>, vis: &mut impl ResultsVisitor<'mir, 'tcx, Self, FlowState = A::Domain> )

source§

impl<'tcx, A> Results<'tcx, A>where A: Analysis<'tcx>,

source

pub fn as_results_cursor<'a, 'mir>( &'a mut self, body: &'mir Body<'tcx> ) -> ResultsRefCursor<'a, 'mir, 'tcx, A>

Creates a ResultsCursor that can inspect these Results.

source§

impl<'tcx, A> Results<'tcx, A>where A: Analysis<'tcx> + CloneAnalysis,

source

pub fn clone_analysis(&self) -> ResultsCloned<'_, 'tcx, A>

Creates a new Results type with a cloned Analysis and borrowed entry sets.

source

pub fn cloned_results_cursor<'mir>( &self, body: &'mir Body<'tcx> ) -> ResultsClonedCursor<'_, 'mir, 'tcx, A>

Creates a ResultsCursor that can inspect these Results.

source§

impl<'res, 'tcx, A> Results<'tcx, A, &'res IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>>where A: Analysis<'tcx> + CloneAnalysis,

source

pub fn reclone_analysis(&self) -> Self

Creates a new Results type with a cloned Analysis and borrowed entry sets.

Trait Implementations§

source§

impl<'a, 'tcx, A, E> AnalysisResults<'tcx, A> for &'a mut Results<'tcx, A, E>where A: Analysis<'tcx>, E: Borrow<IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>>,

§

type EntrySets = E

The type containing the entry sets for this Results type. Read more
source§

impl<'tcx, A, E> AnalysisResults<'tcx, A> for Results<'tcx, A, E>where A: Analysis<'tcx>, E: Borrow<IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>>,

§

type EntrySets = E

The type containing the entry sets for this Results type. Read more
source§

impl<'tcx, A, E> ResultsVisitable<'tcx> for Results<'tcx, A, E>where A: Analysis<'tcx>, E: Borrow<IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>>,

§

type FlowState = <A as AnalysisDomain<'tcx>>::Domain

§

type Direction = <A as AnalysisDomain<'tcx>>::Direction

source§

fn new_flow_state(&self, body: &Body<'tcx>) -> Self::FlowState

Creates an empty FlowState to hold the transient state for these dataflow results. Read more
source§

fn reset_to_block_entry(&self, state: &mut Self::FlowState, block: BasicBlock)

source§

fn reconstruct_before_statement_effect( &mut self, state: &mut Self::FlowState, stmt: &Statement<'tcx>, loc: Location )

source§

fn reconstruct_statement_effect( &mut self, state: &mut Self::FlowState, stmt: &Statement<'tcx>, loc: Location )

source§

fn reconstruct_before_terminator_effect( &mut self, state: &mut Self::FlowState, term: &Terminator<'tcx>, loc: Location )

source§

fn reconstruct_terminator_effect( &mut self, state: &mut Self::FlowState, term: &Terminator<'tcx>, loc: Location )

source§

impl<'tcx, A> ResultsVisitor<'_, 'tcx, Results<'tcx, A, IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>>> for StateDiffCollector<A::Domain>where A: Analysis<'tcx>, A::Domain: DebugWithContext<A>,

§

type FlowState = <A as AnalysisDomain<'tcx>>::Domain

source§

fn visit_block_start( &mut self, _results: &mut Results<'tcx, A>, state: &Self::FlowState, _block_data: &BasicBlockData<'tcx>, _block: BasicBlock )

source§

fn visit_block_end( &mut self, _results: &mut Results<'tcx, A>, state: &Self::FlowState, _block_data: &BasicBlockData<'tcx>, _block: BasicBlock )

source§

fn visit_statement_before_primary_effect( &mut self, results: &mut Results<'tcx, A>, state: &Self::FlowState, _statement: &Statement<'tcx>, _location: Location )

Called with the before_statement_effect of the given statement applied to state but not its statement_effect.
source§

fn visit_statement_after_primary_effect( &mut self, results: &mut Results<'tcx, A>, state: &Self::FlowState, _statement: &Statement<'tcx>, _location: Location )

Called with both the before_statement_effect and the statement_effect of the given statement applied to state.
source§

fn visit_terminator_before_primary_effect( &mut self, results: &mut Results<'tcx, A>, state: &Self::FlowState, _terminator: &Terminator<'tcx>, _location: Location )

Called with the before_terminator_effect of the given terminator applied to state but not its terminator_effect.
source§

fn visit_terminator_after_primary_effect( &mut self, results: &mut Results<'tcx, A>, state: &Self::FlowState, _terminator: &Terminator<'tcx>, _location: Location )

Called with both the before_terminator_effect and the terminator_effect of the given terminator applied to state. Read more

Auto Trait Implementations§

§

impl<'tcx, A, E> RefUnwindSafe for Results<'tcx, A, E>where A: RefUnwindSafe, E: RefUnwindSafe,

§

impl<'tcx, A, E> Send for Results<'tcx, A, E>where A: Send, E: Send,

§

impl<'tcx, A, E> Sync for Results<'tcx, A, E>where A: Sync, E: Sync,

§

impl<'tcx, A, E> Unpin for Results<'tcx, A, E>where A: Unpin, E: Unpin,

§

impl<'tcx, A, E> UnwindSafe for Results<'tcx, A, E>where A: UnwindSafe, E: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.