[−][src]Struct rustc_mir::dataflow::Engine
A solver for dataflow problems.
Fields
bits_per_block: usizetcx: TyCtxt<'tcx>body: &'a Body<'tcx>def_id: DefIddead_unwinds: Option<&'a BitSet<BasicBlock>>entry_sets: IndexVec<BasicBlock, BitSet<A::Idx>>analysis: Atrans_for_block: Option<IndexVec<BasicBlock, GenKillSet<A::Idx>>>Cached, cumulative transfer functions for each block.
Implementations
impl<A, 'tcx, 'a> Engine<'a, 'tcx, A> where
A: GenKillAnalysis<'tcx>, [src]
A: GenKillAnalysis<'tcx>,
pub fn new_gen_kill(
tcx: TyCtxt<'tcx>,
body: &'a Body<'tcx>,
def_id: DefId,
analysis: A
) -> Self[src]
tcx: TyCtxt<'tcx>,
body: &'a Body<'tcx>,
def_id: DefId,
analysis: A
) -> Self
Creates a new Engine to solve a gen-kill dataflow problem.
impl<A, 'tcx, 'a> Engine<'a, 'tcx, A> where
A: Analysis<'tcx>, [src]
A: Analysis<'tcx>,
pub fn new_generic(
tcx: TyCtxt<'tcx>,
body: &'a Body<'tcx>,
def_id: DefId,
analysis: A
) -> Self[src]
tcx: TyCtxt<'tcx>,
body: &'a Body<'tcx>,
def_id: DefId,
analysis: A
) -> Self
Creates a new Engine to solve a dataflow problem with an arbitrary transfer
function.
Gen-kill problems should use new_gen_kill, which will coalesce transfer functions for
better performance.
fn new(
tcx: TyCtxt<'tcx>,
body: &'a Body<'tcx>,
def_id: DefId,
analysis: A,
trans_for_block: Option<IndexVec<BasicBlock, GenKillSet<A::Idx>>>
) -> Self[src]
tcx: TyCtxt<'tcx>,
body: &'a Body<'tcx>,
def_id: DefId,
analysis: A,
trans_for_block: Option<IndexVec<BasicBlock, GenKillSet<A::Idx>>>
) -> Self
pub fn dead_unwinds(self, dead_unwinds: &'a BitSet<BasicBlock>) -> Self[src]
Signals that we do not want dataflow state to propagate across unwind edges for these
BasicBlocks.
You must take care that dead_unwinds does not contain a BasicBlock that can actually
unwind during execution. Otherwise, your dataflow results will not be correct.
pub fn iterate_to_fixpoint(self) -> Results<'tcx, A>[src]
Computes the fixpoint for this dataflow problem and returns it.
Auto Trait Implementations
impl<'a, 'tcx, A> !RefUnwindSafe for Engine<'a, 'tcx, A>
impl<'a, 'tcx, A> !Send for Engine<'a, 'tcx, A>
impl<'a, 'tcx, A> !Sync for Engine<'a, 'tcx, A>
impl<'a, 'tcx, A> Unpin for Engine<'a, 'tcx, A> where
A: Unpin,
<A as AnalysisDomain<'tcx>>::Idx: Unpin,
'tcx: 'a,
A: Unpin,
<A as AnalysisDomain<'tcx>>::Idx: Unpin,
'tcx: 'a,
impl<'a, 'tcx, A> !UnwindSafe for Engine<'a, 'tcx, A>
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,
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.
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.