pub struct LivenessAnalysis {
pub order: Vec<NodeId>,
/* private fields */
}Expand description
Result of running liveness analysis on a ComputeGraph.
Fields§
§order: Vec<NodeId>The topological order used for position assignment.
Implementations§
Source§impl LivenessAnalysis
impl LivenessAnalysis
Sourcepub fn interval(&self, buf: BufferId) -> Option<&LiveInterval>
pub fn interval(&self, buf: BufferId) -> Option<&LiveInterval>
Returns the live interval for a buffer, if it was referenced.
Sourcepub fn all_intervals(&self) -> impl Iterator<Item = &LiveInterval>
pub fn all_intervals(&self) -> impl Iterator<Item = &LiveInterval>
Returns all live intervals.
Sourcepub fn sorted_by_start(&self) -> Vec<&LiveInterval>
pub fn sorted_by_start(&self) -> Vec<&LiveInterval>
Returns all intervals sorted by start position (ascending).
Sourcepub fn interference_pairs(&self) -> Vec<(BufferId, BufferId)>
pub fn interference_pairs(&self) -> Vec<(BufferId, BufferId)>
Returns pairs of buffers whose live intervals overlap (interference set).
The result is deduplicated: each pair (a, b) appears at most once,
with a.0 < b.0.
Sourcepub fn dead_buffers(&self) -> Vec<BufferId>
pub fn dead_buffers(&self) -> Vec<BufferId>
Returns dead buffers (written but never read).
Sourcepub fn max_live_count(&self) -> usize
pub fn max_live_count(&self) -> usize
Returns the maximum number of buffers simultaneously live at any step.
This is a lower bound on the number of live allocations required.
Sourcepub fn max_live_bytes(&self) -> usize
pub fn max_live_bytes(&self) -> usize
Returns the maximum total bytes simultaneously live at any step.
Trait Implementations§
Source§impl Clone for LivenessAnalysis
impl Clone for LivenessAnalysis
Source§fn clone(&self) -> LivenessAnalysis
fn clone(&self) -> LivenessAnalysis
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LivenessAnalysis
impl RefUnwindSafe for LivenessAnalysis
impl Send for LivenessAnalysis
impl Sync for LivenessAnalysis
impl Unpin for LivenessAnalysis
impl UnsafeUnpin for LivenessAnalysis
impl UnwindSafe for LivenessAnalysis
Blanket Implementations§
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