[−][src]Trait rustc_mir::dataflow::GenKillAnalysis
A gen/kill dataflow problem.
Each method in this trait has a corresponding one in Analysis. However, these methods only
allow modification of the dataflow state via "gen" and "kill" operations. By defining transfer
functions for each statement in this way, the transfer function for an entire basic block can
be computed efficiently.
Analysis is automatically implemented for all implementers of GenKillAnalysis.
Required methods
fn statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
statement: &Statement<'tcx>,
location: Location
)
&self,
trans: &mut impl GenKill<Self::Idx>,
statement: &Statement<'tcx>,
location: Location
)
See Analysis::apply_statement_effect.
fn terminator_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
terminator: &Terminator<'tcx>,
location: Location
)
&self,
trans: &mut impl GenKill<Self::Idx>,
terminator: &Terminator<'tcx>,
location: Location
)
See Analysis::apply_terminator_effect.
fn call_return_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
block: BasicBlock,
func: &Operand<'tcx>,
args: &[Operand<'tcx>],
return_place: Place<'tcx>
)
&self,
trans: &mut impl GenKill<Self::Idx>,
block: BasicBlock,
func: &Operand<'tcx>,
args: &[Operand<'tcx>],
return_place: Place<'tcx>
)
See Analysis::apply_call_return_effect.
Provided methods
fn before_statement_effect(
&self,
_trans: &mut impl GenKill<Self::Idx>,
_statement: &Statement<'tcx>,
_location: Location
)
&self,
_trans: &mut impl GenKill<Self::Idx>,
_statement: &Statement<'tcx>,
_location: Location
)
See Analysis::apply_before_statement_effect.
fn before_terminator_effect(
&self,
_trans: &mut impl GenKill<Self::Idx>,
_terminator: &Terminator<'tcx>,
_location: Location
)
&self,
_trans: &mut impl GenKill<Self::Idx>,
_terminator: &Terminator<'tcx>,
_location: Location
)
See Analysis::apply_before_terminator_effect.
fn yield_resume_effect(
&self,
_trans: &mut impl GenKill<Self::Idx>,
_resume_block: BasicBlock,
_resume_place: Place<'tcx>
)
&self,
_trans: &mut impl GenKill<Self::Idx>,
_resume_block: BasicBlock,
_resume_place: Place<'tcx>
)
See Analysis::apply_yield_resume_effect.
fn discriminant_switch_effect(
&self,
_state: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_enum_place: Place<'tcx>,
_adt: &AdtDef,
_variant: VariantIdx
)
&self,
_state: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_enum_place: Place<'tcx>,
_adt: &AdtDef,
_variant: VariantIdx
)
See Analysis::apply_discriminant_switch_effect.
Implementors
impl<'mir, 'tcx> GenKillAnalysis<'tcx> for MaybeRequiresStorage<'mir, 'tcx>[src]
fn before_statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
stmt: &Statement<'tcx>,
loc: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
stmt: &Statement<'tcx>,
loc: Location
)
fn statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_: &Statement<'tcx>,
loc: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_: &Statement<'tcx>,
loc: Location
)
fn before_terminator_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
terminator: &Terminator<'tcx>,
loc: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
terminator: &Terminator<'tcx>,
loc: Location
)
fn terminator_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
terminator: &Terminator<'tcx>,
loc: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
terminator: &Terminator<'tcx>,
loc: Location
)
fn call_return_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
return_place: Place<'tcx>
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
return_place: Place<'tcx>
)
fn yield_resume_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_resume_block: BasicBlock,
resume_place: Place<'tcx>
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_resume_block: BasicBlock,
resume_place: Place<'tcx>
)
impl<'tcx> GenKillAnalysis<'tcx> for MaybeInitializedLocals[src]
fn statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
statement: &Statement<'tcx>,
loc: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
statement: &Statement<'tcx>,
loc: Location
)
fn terminator_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
terminator: &Terminator<'tcx>,
loc: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
terminator: &Terminator<'tcx>,
loc: Location
)
fn call_return_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
return_place: Place<'tcx>
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
return_place: Place<'tcx>
)
fn yield_resume_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_resume_block: BasicBlock,
resume_place: Place<'tcx>
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_resume_block: BasicBlock,
resume_place: Place<'tcx>
)
See Analysis::apply_yield_resume_effect.
impl<'tcx> GenKillAnalysis<'tcx> for MaybeLiveLocals[src]
fn statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
statement: &Statement<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
statement: &Statement<'tcx>,
location: Location
)
fn terminator_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
terminator: &Terminator<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
terminator: &Terminator<'tcx>,
location: Location
)
fn call_return_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
dest_place: Place<'tcx>
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
dest_place: Place<'tcx>
)
fn yield_resume_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_resume_block: BasicBlock,
resume_place: Place<'tcx>
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_resume_block: BasicBlock,
resume_place: Place<'tcx>
)
impl<'tcx> GenKillAnalysis<'tcx> for MaybeStorageLive[src]
fn statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
stmt: &Statement<'tcx>,
_: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
stmt: &Statement<'tcx>,
_: Location
)
fn terminator_effect(
&self,
_trans: &mut impl GenKill<Self::Idx>,
_: &Terminator<'tcx>,
_: Location
)[src]
&self,
_trans: &mut impl GenKill<Self::Idx>,
_: &Terminator<'tcx>,
_: Location
)
fn call_return_effect(
&self,
_trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
_return_place: Place<'tcx>
)[src]
&self,
_trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
_return_place: Place<'tcx>
)
impl<'tcx, '_> GenKillAnalysis<'tcx> for Borrows<'_, 'tcx>[src]
fn before_statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_statement: &Statement<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_statement: &Statement<'tcx>,
location: Location
)
fn statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
stmt: &Statement<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
stmt: &Statement<'tcx>,
location: Location
)
fn before_terminator_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_terminator: &Terminator<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_terminator: &Terminator<'tcx>,
location: Location
)
fn terminator_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
teminator: &Terminator<'tcx>,
_location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
teminator: &Terminator<'tcx>,
_location: Location
)
fn call_return_effect(
&self,
_trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
_dest_place: Place<'tcx>
)[src]
&self,
_trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
_dest_place: Place<'tcx>
)
impl<'tcx, '_> GenKillAnalysis<'tcx> for DefinitelyInitializedPlaces<'_, 'tcx>[src]
fn statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_statement: &Statement<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_statement: &Statement<'tcx>,
location: Location
)
fn terminator_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_terminator: &Terminator<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_terminator: &Terminator<'tcx>,
location: Location
)
fn call_return_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
dest_place: Place<'tcx>
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
dest_place: Place<'tcx>
)
impl<'tcx, '_> GenKillAnalysis<'tcx> for EverInitializedPlaces<'_, 'tcx>[src]
fn statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
stmt: &Statement<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
stmt: &Statement<'tcx>,
location: Location
)
fn terminator_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_terminator: &Terminator<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_terminator: &Terminator<'tcx>,
location: Location
)
fn call_return_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
_dest_place: Place<'tcx>
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
_dest_place: Place<'tcx>
)
impl<'tcx, '_> GenKillAnalysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx>[src]
fn statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_statement: &Statement<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_statement: &Statement<'tcx>,
location: Location
)
fn terminator_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_terminator: &Terminator<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_terminator: &Terminator<'tcx>,
location: Location
)
fn call_return_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
dest_place: Place<'tcx>
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
dest_place: Place<'tcx>
)
fn discriminant_switch_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
enum_place: Place<'tcx>,
_adt: &AdtDef,
variant: VariantIdx
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
enum_place: Place<'tcx>,
_adt: &AdtDef,
variant: VariantIdx
)
impl<'tcx, '_> GenKillAnalysis<'tcx> for MaybeUninitializedPlaces<'_, 'tcx>[src]
fn statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_statement: &Statement<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_statement: &Statement<'tcx>,
location: Location
)
fn terminator_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_terminator: &Terminator<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_terminator: &Terminator<'tcx>,
location: Location
)
fn call_return_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
dest_place: Place<'tcx>
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
dest_place: Place<'tcx>
)
fn discriminant_switch_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
enum_place: Place<'tcx>,
_adt: &AdtDef,
variant: VariantIdx
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
enum_place: Place<'tcx>,
_adt: &AdtDef,
variant: VariantIdx
)
impl<K, 'tcx> GenKillAnalysis<'tcx> for MaybeBorrowedLocals<K> where
K: BorrowAnalysisKind<'tcx>, [src]
K: BorrowAnalysisKind<'tcx>,
fn statement_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
statement: &Statement<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
statement: &Statement<'tcx>,
location: Location
)
fn terminator_effect(
&self,
trans: &mut impl GenKill<Self::Idx>,
terminator: &Terminator<'tcx>,
location: Location
)[src]
&self,
trans: &mut impl GenKill<Self::Idx>,
terminator: &Terminator<'tcx>,
location: Location
)
fn call_return_effect(
&self,
_trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
_dest_place: Place<'tcx>
)[src]
&self,
_trans: &mut impl GenKill<Self::Idx>,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
_dest_place: Place<'tcx>
)