#[non_exhaustive]pub enum Location {
None,
Reg(PReg),
Slot(StackSlot),
}Expand description
Where a virtual register lives for its whole life after allocation.
§Examples
use backend_lang::regalloc::Location;
use backend_lang::x86_64::RAX;
assert_eq!(Location::Reg(RAX), Location::Reg(RAX));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
Not live anywhere reachable (never used, or only in dead code).
Reg(PReg)
A physical register.
Slot(StackSlot)
A stack slot (a spilled block parameter).
Trait Implementations§
impl Copy for Location
impl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnsafeUnpin for Location
impl UnwindSafe for Location
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