pub struct PRegSet { /* private fields */ }
Expand description
A physical register set. Used to represent clobbers efficiently.
The set is Copy
and is guaranteed to have constant, and small,
size, as it is based on a bitset internally.
Implementations§
source§impl PRegSet
impl PRegSet
sourcepub fn contains(&self, reg: PReg) -> bool
pub fn contains(&self, reg: PReg) -> bool
Returns whether the given register is part of the set.
sourcepub const fn with(self, reg: PReg) -> Self
pub const fn with(self, reg: PReg) -> Self
Add a physical register (PReg) to the set, returning the new value.
sourcepub fn union_from(&mut self, other: PRegSet)
pub fn union_from(&mut self, other: PRegSet)
Add all of the registers in one set to this one, mutating in place.
Trait Implementations§
source§impl From<&MachineEnv> for PRegSet
impl From<&MachineEnv> for PRegSet
source§fn from(env: &MachineEnv) -> Self
fn from(env: &MachineEnv) -> Self
Converts to this type from the input type.
source§impl IntoIterator for PRegSet
impl IntoIterator for PRegSet
source§impl Ord for PRegSet
impl Ord for PRegSet
source§impl PartialEq for PRegSet
impl PartialEq for PRegSet
source§impl PartialOrd for PRegSet
impl PartialOrd for PRegSet
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 moreimpl Copy for PRegSet
impl Eq for PRegSet
impl StructuralPartialEq for PRegSet
Auto Trait Implementations§
impl Freeze for PRegSet
impl RefUnwindSafe for PRegSet
impl Send for PRegSet
impl Sync for PRegSet
impl Unpin for PRegSet
impl UnwindSafe for PRegSet
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)