Struct rustc::middle::dataflow::DataFlowContext
[−]
[src]
pub struct DataFlowContext<'a, 'tcx: 'a, O> { /* fields omitted */ }🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Methods
impl<'a, 'tcx, O: DataFlowOperator> DataFlowContext<'a, 'tcx, O>[src]
pub fn new(
tcx: TyCtxt<'a, 'tcx, 'tcx>,
analysis_name: &'static str,
body: Option<&Body>,
cfg: &CFG,
oper: O,
id_range: IdRange,
bits_per_id: usize
) -> DataFlowContext<'a, 'tcx, O>[src]
tcx: TyCtxt<'a, 'tcx, 'tcx>,
analysis_name: &'static str,
body: Option<&Body>,
cfg: &CFG,
oper: O,
id_range: IdRange,
bits_per_id: usize
) -> DataFlowContext<'a, 'tcx, O>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn add_gen(&mut self, id: ItemLocalId, bit: usize)[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Indicates that id generates bit
pub fn add_kill(&mut self, kind: KillFrom, id: ItemLocalId, bit: usize)[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Indicates that id kills bit
pub fn each_bit_on_entry<F>(&self, id: ItemLocalId, f: F) -> bool where
F: FnMut(usize) -> bool, [src]
F: FnMut(usize) -> bool,
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Iterates through each bit that is set on entry to id.
Only useful after propagate() has been called.
pub fn each_bit_for_node<F>(
&self,
e: EntryOrExit,
cfgidx: CFGIndex,
f: F
) -> bool where
F: FnMut(usize) -> bool, [src]
&self,
e: EntryOrExit,
cfgidx: CFGIndex,
f: F
) -> bool where
F: FnMut(usize) -> bool,
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Iterates through each bit that is set on entry/exit to cfgidx.
Only useful after propagate() has been called.
pub fn each_gen_bit<F>(&self, id: ItemLocalId, f: F) -> bool where
F: FnMut(usize) -> bool, [src]
F: FnMut(usize) -> bool,
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Iterates through each bit in the gen set for id.
pub fn add_kills_from_flow_exits(&mut self, cfg: &CFG)[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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: DataFlowOperator + Clone + 'static> DataFlowContext<'a, 'tcx, O>[src]
pub fn propagate(&mut self, cfg: &CFG, body: &Body)[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Performs the data flow analysis.
Trait Implementations
impl<'a, 'tcx: 'a, O: Clone> Clone for DataFlowContext<'a, 'tcx, O>[src]
fn clone(&self) -> DataFlowContext<'a, 'tcx, O>[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<'a, 'tcx, O: DataFlowOperator> PpAnn for DataFlowContext<'a, 'tcx, O>[src]
fn nested(&self, state: &mut State, nested: Nested) -> Result<()>[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn pre(&self, ps: &mut State, node: AnnNode) -> Result<()>[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn post(&self, _state: &mut State, _node: AnnNode) -> Result<()>[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?