Enum regalloc2::OperandConstraint
source · pub enum OperandConstraint {
Any,
Reg,
Stack,
FixedReg(PReg),
Reuse(usize),
}
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§
source§impl Clone for OperandConstraint
impl Clone for OperandConstraint
source§fn clone(&self) -> OperandConstraint
fn clone(&self) -> OperandConstraint
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OperandConstraint
impl Debug for OperandConstraint
source§impl Display for OperandConstraint
impl Display for OperandConstraint
source§impl PartialEq for OperandConstraint
impl PartialEq for OperandConstraint
source§fn eq(&self, other: &OperandConstraint) -> bool
fn eq(&self, other: &OperandConstraint) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for OperandConstraint
impl Eq for OperandConstraint
impl StructuralPartialEq for OperandConstraint
Auto Trait Implementations§
impl Freeze for OperandConstraint
impl RefUnwindSafe for OperandConstraint
impl Send for OperandConstraint
impl Sync for OperandConstraint
impl Unpin for OperandConstraint
impl UnwindSafe for OperandConstraint
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
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)
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)
clone_to_uninit
)