pub enum Allocation {
Allocated(Vec<(usize, usize)>),
Spill {
pressure: usize,
must_spill: Vec<usize>,
},
}Expand description
The result of allocating physical registers to a basic block.
Variants§
Allocated(Vec<(usize, usize)>)
Success: (var, register) pairs, every register in 0..registers, no two
simultaneously-live variables sharing one (re-checkable via is_valid_allocation).
Spill
Spilling is unavoidable: the block needs pressure registers, and must_spill is a set of
pairwise-live variables larger than the register count — a certified proof that they cannot
all be kept in registers (re-checkable via is_spill_certificate).
Trait Implementations§
Source§impl Clone for Allocation
impl Clone for Allocation
Source§fn clone(&self) -> Allocation
fn clone(&self) -> Allocation
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 moreSource§impl Debug for Allocation
impl Debug for Allocation
Source§impl PartialEq for Allocation
impl PartialEq for Allocation
Source§fn eq(&self, other: &Allocation) -> bool
fn eq(&self, other: &Allocation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for Allocation
impl StructuralPartialEq for Allocation
Auto Trait Implementations§
impl Freeze for Allocation
impl RefUnwindSafe for Allocation
impl Send for Allocation
impl Sync for Allocation
impl Unpin for Allocation
impl UnsafeUnpin for Allocation
impl UnwindSafe for Allocation
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