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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.