Struct regalloc2::Allocation
source · 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<Allocation> for Allocation
impl PartialEq<Allocation> for Allocation
source§fn eq(&self, other: &Allocation) -> bool
fn eq(&self, other: &Allocation) -> bool
source§impl PartialOrd<Allocation> for Allocation
impl PartialOrd<Allocation> for Allocation
source§fn partial_cmp(&self, other: &Allocation) -> Option<Ordering>
fn partial_cmp(&self, other: &Allocation) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more