pub struct Allocation { /* private fields */ }
Expand description
An Allocation represents the end result of regalloc for an Operand.
Implementations§
source§impl Allocation
impl Allocation
sourcepub fn none() -> Allocation
pub fn none() -> Allocation
Get the “none” allocation, which is distinct from the other possibilities and is used to initialize data structures.
sourcepub fn reg(preg: PReg) -> Allocation
pub fn reg(preg: PReg) -> Allocation
Create an allocation into a register.
sourcepub fn stack(slot: SpillSlot) -> Allocation
pub fn stack(slot: SpillSlot) -> Allocation
Create an allocation into a spillslot.
sourcepub fn kind(self) -> AllocationKind
pub fn kind(self) -> AllocationKind
Get the allocation’s “kind”: none, register, or stack (spillslot).
Trait Implementations§
source§impl Clone for Allocation
impl Clone for Allocation
source§fn clone(&self) -> Allocation
fn clone(&self) -> Allocation
Returns a copy of the value. Read more
1.0.0 · 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 Display for Allocation
impl Display for Allocation
source§impl Hash for Allocation
impl Hash for Allocation
source§impl Ord for Allocation
impl Ord for Allocation
source§fn cmp(&self, other: &Allocation) -> Ordering
fn cmp(&self, other: &Allocation) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for Allocation
impl PartialEq for Allocation
source§impl PartialOrd for Allocation
impl PartialOrd for Allocation
impl Copy for Allocation
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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)