pub enum RegClass {
Int,
Float,
}
Expand description
Register classes.
Every value has a “register class”, which is like a type at the register-allocator level. Every register must belong to only one class; i.e., they are disjoint.
For tight bit-packing throughout our data structures, we support only two classes, “int” and “float”. This will usually be enough on modern machines, as they have one class of general-purpose integer registers of machine width (e.g. 64 bits), and another class of float/vector registers used both for FP and for vector operations. If needed, we could adjust bitpacking to allow for more classes in the future.
Variants
Int
Float
Trait Implementations
sourceimpl Ord for RegClass
impl Ord for RegClass
sourceimpl PartialOrd<RegClass> for RegClass
impl PartialOrd<RegClass> for RegClass
sourcefn partial_cmp(&self, other: &RegClass) -> Option<Ordering>
fn partial_cmp(&self, other: &RegClass) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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
impl Copy for RegClass
impl Eq for RegClass
impl StructuralEq for RegClass
impl StructuralPartialEq for RegClass
Auto Trait Implementations
impl RefUnwindSafe for RegClass
impl Send for RegClass
impl Sync for RegClass
impl Unpin for RegClass
impl UnwindSafe for RegClass
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more