pub struct LivenessResult {
pub live_in: HashMap<BasicBlockId, HashSet<SlotId>>,
pub live_out: HashMap<BasicBlockId, HashSet<SlotId>>,
}Expand description
Result of liveness analysis for a MIR function.
Fields§
§live_in: HashMap<BasicBlockId, HashSet<SlotId>>Variables live at the entry of each block.
live_out: HashMap<BasicBlockId, HashSet<SlotId>>Variables live at the exit of each block.
Implementations§
Source§impl LivenessResult
impl LivenessResult
Sourcepub fn is_live_after(
&self,
block: BasicBlockId,
stmt_idx: usize,
slot: SlotId,
mir: &MirFunction,
) -> bool
pub fn is_live_after( &self, block: BasicBlockId, stmt_idx: usize, slot: SlotId, mir: &MirFunction, ) -> bool
Check if a variable is live at a given point within a block. Walks backwards from the block exit to the statement index.
Sourcepub fn is_live_at_entry(&self, block: BasicBlockId, slot: SlotId) -> bool
pub fn is_live_at_entry(&self, block: BasicBlockId, slot: SlotId) -> bool
Check if a variable is live at the entry of a block.
Trait Implementations§
Source§impl Clone for LivenessResult
impl Clone for LivenessResult
Auto Trait Implementations§
impl Freeze for LivenessResult
impl RefUnwindSafe for LivenessResult
impl Send for LivenessResult
impl Sync for LivenessResult
impl Unpin for LivenessResult
impl UnsafeUnpin for LivenessResult
impl UnwindSafe for LivenessResult
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more