pub struct Engine<'a, 'tcx, A>where
    A: Analysis<'tcx>,
{ tcx: TyCtxt<'tcx>, body: &'a Body<'tcx>, dead_unwinds: Option<&'a BitSet<BasicBlock>>, entry_sets: IndexVec<BasicBlock, A::Domain>, pass_name: Option<&'static str>, analysis: A, apply_trans_for_block: Option<Box<dyn Fn(BasicBlock, &mut A::Domain)>>, }
Expand description

A solver for dataflow problems.

Fields

tcx: TyCtxt<'tcx>body: &'a Body<'tcx>dead_unwinds: Option<&'a BitSet<BasicBlock>>entry_sets: IndexVec<BasicBlock, A::Domain>pass_name: Option<&'static str>analysis: Aapply_trans_for_block: Option<Box<dyn Fn(BasicBlock, &mut A::Domain)>>

Cached, cumulative transfer functions for each block.

Implementations

Creates a new Engine to solve a gen-kill dataflow problem.

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.

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.

Adds an identifier to the graphviz output for this particular run of a dataflow analysis.

Some analyses are run multiple times in the compilation pipeline. Give them a pass_name to differentiate them. Otherwise, only the results for the latest run will be saved.

Computes the fixpoint for this dataflow problem and returns it.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion 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.