[−][src]Trait rustc_mir::dataflow::AnalysisDomain
Define the domain of a dataflow problem.
This trait specifies the lattice on which this analysis operates. For now, this must be a
powerset of values of type Idx. The elements of this lattice are represented with a BitSet
and referred to as the state vector.
This trait also defines the initial value for the dataflow state upon entry to the
START_BLOCK, as well as some names used to refer to this analysis when debugging.
Associated Types
type Idx: Idx
The type of the elements in the state vector.
type Direction: Direction = Forward
The direction of this analyis. Either Forward or Backward.
Associated Constants
const NAME: &'static str
A descriptive name for this analysis. Used only for debugging.
This name should be brief and contain no spaces, periods or other characters that are not suitable as part of a filename.
Required methods
fn bits_per_block(&self, body: &Body<'tcx>) -> usize
The size of the state vector.
fn initialize_start_block(
&self,
body: &Body<'tcx>,
state: &mut BitSet<Self::Idx>
)
&self,
body: &Body<'tcx>,
state: &mut BitSet<Self::Idx>
)
Mutates the entry set of the START_BLOCK to contain the initial state for dataflow
analysis.
For backward analyses, initial state besides the bottom value is not yet supported. Trying to mutate the initial state will result in a panic.
Provided methods
fn pretty_print_idx(&self, w: &mut impl Write, idx: Self::Idx) -> Result<()>
Prints an element in the state vector for debugging.
Implementors
impl<'a, 'tcx> AnalysisDomain<'tcx> for DefinitelyInitializedPlaces<'a, 'tcx>[src]
type Idx = MovePathIndex
const NAME: &'static str[src]
fn bits_per_block(&self, _: &Body<'tcx>) -> usize[src]
fn initialize_start_block(&self, _: &Body<'tcx>, state: &mut BitSet<Self::Idx>)[src]
fn pretty_print_idx(&self, w: &mut impl Write, mpi: Self::Idx) -> Result<()>[src]
impl<'mir, 'tcx> AnalysisDomain<'tcx> for MaybeRequiresStorage<'mir, 'tcx>[src]
type Idx = Local
const NAME: &'static str[src]
fn bits_per_block(&self, body: &Body<'tcx>) -> usize[src]
fn initialize_start_block(
&self,
body: &Body<'tcx>,
on_entry: &mut BitSet<Self::Idx>
)[src]
&self,
body: &Body<'tcx>,
on_entry: &mut BitSet<Self::Idx>
)
impl<'tcx> AnalysisDomain<'tcx> for MaybeInitializedLocals[src]
type Idx = Local
const NAME: &'static str[src]
fn bits_per_block(&self, body: &Body<'tcx>) -> usize[src]
fn initialize_start_block(
&self,
body: &Body<'tcx>,
entry_set: &mut BitSet<Self::Idx>
)[src]
&self,
body: &Body<'tcx>,
entry_set: &mut BitSet<Self::Idx>
)
impl<'tcx> AnalysisDomain<'tcx> for MaybeLiveLocals[src]
type Idx = Local
type Direction = Backward
const NAME: &'static str[src]
fn bits_per_block(&self, body: &Body<'tcx>) -> usize[src]
fn initialize_start_block(&self, _: &Body<'tcx>, _: &mut BitSet<Self::Idx>)[src]
impl<'tcx> AnalysisDomain<'tcx> for MaybeStorageLive[src]
type Idx = Local
const NAME: &'static str[src]
fn bits_per_block(&self, body: &Body<'tcx>) -> usize[src]
fn initialize_start_block(
&self,
body: &Body<'tcx>,
on_entry: &mut BitSet<Self::Idx>
)[src]
&self,
body: &Body<'tcx>,
on_entry: &mut BitSet<Self::Idx>
)
impl<'tcx, '_> AnalysisDomain<'tcx> for Borrows<'_, 'tcx>[src]
type Idx = BorrowIndex
const NAME: &'static str[src]
fn bits_per_block(&self, _: &Body<'tcx>) -> usize[src]
fn initialize_start_block(&self, _: &Body<'tcx>, _: &mut BitSet<Self::Idx>)[src]
fn pretty_print_idx(&self, w: &mut impl Write, idx: Self::Idx) -> Result<()>[src]
impl<'tcx, '_> AnalysisDomain<'tcx> for EverInitializedPlaces<'_, 'tcx>[src]
type Idx = InitIndex
const NAME: &'static str[src]
fn bits_per_block(&self, _: &Body<'tcx>) -> usize[src]
fn initialize_start_block(
&self,
body: &Body<'tcx>,
state: &mut BitSet<Self::Idx>
)[src]
&self,
body: &Body<'tcx>,
state: &mut BitSet<Self::Idx>
)
impl<'tcx, '_> AnalysisDomain<'tcx> for MaybeInitializedPlaces<'_, 'tcx>[src]
type Idx = MovePathIndex
const NAME: &'static str[src]
fn bits_per_block(&self, _: &Body<'tcx>) -> usize[src]
fn initialize_start_block(&self, _: &Body<'tcx>, state: &mut BitSet<Self::Idx>)[src]
fn pretty_print_idx(&self, w: &mut impl Write, mpi: Self::Idx) -> Result<()>[src]
impl<'tcx, '_> AnalysisDomain<'tcx> for MaybeUninitializedPlaces<'_, 'tcx>[src]
type Idx = MovePathIndex
const NAME: &'static str[src]
fn bits_per_block(&self, _: &Body<'tcx>) -> usize[src]
fn initialize_start_block(
&self,
body: &Body<'tcx>,
state: &mut BitSet<Self::Idx>
)[src]
&self,
body: &Body<'tcx>,
state: &mut BitSet<Self::Idx>
)
fn pretty_print_idx(&self, w: &mut impl Write, mpi: Self::Idx) -> Result<()>[src]
impl<K, 'tcx> AnalysisDomain<'tcx> for MaybeBorrowedLocals<K> where
K: BorrowAnalysisKind<'tcx>, [src]
K: BorrowAnalysisKind<'tcx>,
type Idx = Local
const NAME: &'static str[src]
fn bits_per_block(&self, body: &Body<'tcx>) -> usize[src]
fn initialize_start_block(&self, _: &Body<'tcx>, _: &mut BitSet<Self::Idx>)[src]
impl<Q, 'tcx, '_, '_> AnalysisDomain<'tcx> for FlowSensitiveAnalysis<'_, '_, 'tcx, Q> where
Q: Qualif, [src]
Q: Qualif,