Struct rustc_mir_dataflow::Results
source · 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>>,
impl<'tcx, A, E> Results<'tcx, A, E>where A: Analysis<'tcx>, E: Borrow<IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>>,
sourcepub fn into_results_cursor<'mir>(
self,
body: &'mir Body<'tcx>
) -> ResultsCursor<'mir, 'tcx, A, Self>
pub fn into_results_cursor<'mir>( self, body: &'mir Body<'tcx> ) -> ResultsCursor<'mir, 'tcx, A, Self>
Creates a ResultsCursor
that can inspect these Results
.
sourcepub fn entry_set_for_block(&self, block: BasicBlock) -> &A::Domain
pub fn entry_set_for_block(&self, block: BasicBlock) -> &A::Domain
Gets the dataflow state for the given block.
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> )
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>,
impl<'tcx, A> Results<'tcx, A>where A: Analysis<'tcx>,
sourcepub fn as_results_cursor<'a, 'mir>(
&'a mut self,
body: &'mir Body<'tcx>
) -> ResultsRefCursor<'a, 'mir, 'tcx, A>
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,
impl<'tcx, A> Results<'tcx, A>where A: Analysis<'tcx> + CloneAnalysis,
sourcepub fn clone_analysis(&self) -> ResultsCloned<'_, 'tcx, A>
pub fn clone_analysis(&self) -> ResultsCloned<'_, 'tcx, A>
Creates a new Results
type with a cloned Analysis
and borrowed entry sets.
sourcepub fn cloned_results_cursor<'mir>(
&self,
body: &'mir Body<'tcx>
) -> ResultsClonedCursor<'_, 'mir, 'tcx, A>
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,
impl<'res, 'tcx, A> Results<'tcx, A, &'res IndexVec<BasicBlock, <A as AnalysisDomain<'tcx>>::Domain>>where A: Analysis<'tcx> + CloneAnalysis,
sourcepub fn reclone_analysis(&self) -> Self
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>>,
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>>,
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>>,
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>>,
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>>,
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
fn new_flow_state(&self, body: &Body<'tcx>) -> Self::FlowState
Creates an empty
FlowState
to hold the transient state for these dataflow results. Read morefn reset_to_block_entry(&self, state: &mut Self::FlowState, block: BasicBlock)
fn reconstruct_before_statement_effect( &mut self, state: &mut Self::FlowState, stmt: &Statement<'tcx>, loc: Location )
fn reconstruct_statement_effect( &mut self, state: &mut Self::FlowState, stmt: &Statement<'tcx>, loc: Location )
fn reconstruct_before_terminator_effect( &mut self, state: &mut Self::FlowState, term: &Terminator<'tcx>, loc: Location )
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>,
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
fn visit_block_start( &mut self, _results: &mut Results<'tcx, A>, state: &Self::FlowState, _block_data: &BasicBlockData<'tcx>, _block: BasicBlock )
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
)
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
)
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
)
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
)
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 moreAuto 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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.