Enum regalloc2::OperandConstraint
source · [−]Expand description
An OperandConstraint
specifies where a vreg’s value must be
placed at a particular reference to that vreg via an
Operand
. The constraint may be loose – “any register of a given
class”, for example – or very specific, such as “this particular
physical register”. The allocator’s result will always satisfy all
given constraints; however, if the input has a combination of
constraints that are impossible to satisfy, then allocation may
fail or the allocator may panic (providing impossible constraints
is usually a programming error in the client, rather than a
function of bad input).
Variants
Any
Any location is fine (register or stack slot).
Reg
Operand must be in a register. Register is read-only for Uses.
Stack
Operand must be on the stack.
FixedReg(PReg)
Operand must be in a fixed register.
Reuse(usize)
On defs only: reuse a use’s register.
Trait Implementations
sourceimpl Clone for OperandConstraint
impl Clone for OperandConstraint
sourcefn clone(&self) -> OperandConstraint
fn clone(&self) -> OperandConstraint
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for OperandConstraint
impl Debug for OperandConstraint
sourceimpl Display for OperandConstraint
impl Display for OperandConstraint
sourceimpl PartialEq<OperandConstraint> for OperandConstraint
impl PartialEq<OperandConstraint> for OperandConstraint
sourcefn eq(&self, other: &OperandConstraint) -> bool
fn eq(&self, other: &OperandConstraint) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &OperandConstraint) -> bool
fn ne(&self, other: &OperandConstraint) -> bool
This method tests for !=
.
impl Copy for OperandConstraint
impl Eq for OperandConstraint
impl StructuralEq for OperandConstraint
impl StructuralPartialEq for OperandConstraint
Auto Trait Implementations
impl RefUnwindSafe for OperandConstraint
impl Send for OperandConstraint
impl Sync for OperandConstraint
impl Unpin for OperandConstraint
impl UnwindSafe for OperandConstraint
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