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<OperandConstraint> for OperandConstraint
impl PartialEq<OperandConstraint> 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 ==
.