Struct rustc_mir::util::liveness::LivenessResult [−][src]
pub struct LivenessResult<V: Idx> { pub mode: LivenessMode, pub outs: IndexVec<BasicBlock, LiveVarSet<V>>, }
🔬 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?
This gives the result of the liveness analysis at the boundary of
basic blocks. You can use simulate_block
to obtain the
intra-block results.
The V
type defines the set of variables that we computed
liveness for. This is often Local
, in which case we computed
liveness for all variables -- but it can also be some other type,
which indicates a subset of the variables within the graph.
Fields
mode: LivenessMode
🔬 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?
Liveness mode in use when these results were computed.
outs: IndexVec<BasicBlock, LiveVarSet<V>>
🔬 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?
Live variables on exit to each basic block. This is equal to
the union of the ins
for each successor.
Methods
impl<V: Idx> LivenessResult<V>
[src]
impl<V: Idx> LivenessResult<V>
pub fn simulate_block<'tcx, OP>(
&self,
mir: &Mir<'tcx>,
block: BasicBlock,
map: &impl LiveVariableMap<LiveVar = V>,
callback: OP
) where
OP: FnMut(Location, &LiveVarSet<V>),
[src]
pub fn simulate_block<'tcx, OP>(
&self,
mir: &Mir<'tcx>,
block: BasicBlock,
map: &impl LiveVariableMap<LiveVar = V>,
callback: OP
) where
OP: FnMut(Location, &LiveVarSet<V>),
🔬 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?
Walks backwards through the statements/terminator in the given
basic block block
. At each point within block
, invokes
the callback op
with the current location and the set of
variables that are live on entry to that location.
Auto Trait Implementations
impl<V> Send for LivenessResult<V>
impl<V> Send for LivenessResult<V>
impl<V> Sync for LivenessResult<V>
impl<V> Sync for LivenessResult<V>