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 PartialOrd<PRegSet> for PRegSet
impl PartialOrd<PRegSet> 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 more