Struct rustc_trans::middle::dataflow::DataFlowContext
[−]
[src]
pub struct DataFlowContext<'a, 'tcx, O> where 'tcx: 'a {
// some fields omitted
}
rustc_private
)Methods
impl<'a, 'tcx, O> DataFlowContext<'a, 'tcx, O> where O: DataFlowOperator
fn new(tcx: TyCtxt<'a, 'tcx, 'tcx>, analysis_name: &'static str, decl: Option<&FnDecl>, cfg: &CFG, oper: O, id_range: IdRange, bits_per_id: usize) -> DataFlowContext<'a, 'tcx, O>
fn add_gen(&mut self, id: u32, bit: usize)
rustc_private
)Indicates that id
generates bit
fn add_kill(&mut self, kind: KillFrom, id: u32, bit: usize)
rustc_private
)Indicates that id
kills bit
fn each_bit_on_entry<F>(&self, id: u32, f: F) -> bool where F: FnMut(usize) -> bool
rustc_private
)Iterates through each bit that is set on entry to id
.
Only useful after propagate()
has been called.
fn each_bit_for_node<F>(&self, e: EntryOrExit, cfgidx: NodeIndex, f: F) -> bool where F: FnMut(usize) -> bool
rustc_private
)Iterates through each bit that is set on entry/exit to cfgidx
.
Only useful after propagate()
has been called.
fn each_gen_bit<F>(&self, id: u32, f: F) -> bool where F: FnMut(usize) -> bool
rustc_private
)Iterates through each bit in the gen set for id
.
fn add_kills_from_flow_exits(&mut self, cfg: &CFG)
rustc_private
)Whenever you have a break
or continue
statement, flow
exits through any number of enclosing scopes on its way to
the new destination. This function infers the kill bits of
those control operators based on the kill bits associated
with those scopes.
This is usually called (if it is called at all), after all add_gen and add_kill calls, but before propagate.
impl<'a, 'tcx, O> DataFlowContext<'a, 'tcx, O> where O: 'static + DataFlowOperator + Clone
fn propagate(&mut self, cfg: &CFG, blk: &Block)
rustc_private
)Performs the data flow analysis.
Trait Implementations
impl<'a, 'tcx, O> PpAnn for DataFlowContext<'a, 'tcx, O> where O: DataFlowOperator
Derived Implementations
impl<'a, 'tcx, O> Clone for DataFlowContext<'a, 'tcx, O> where 'tcx: 'a, O: Clone
fn clone(&self) -> DataFlowContext<'a, 'tcx, O>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more