pub struct Output {
    pub num_spillslots: usize,
    pub edits: Vec<(ProgPoint, Edit)>,
    pub allocs: Vec<Allocation>,
    pub inst_alloc_offsets: Vec<u32>,
    pub safepoint_slots: Vec<(ProgPoint, Allocation)>,
    pub debug_locations: Vec<(u32, ProgPoint, ProgPoint, Allocation)>,
    pub stats: Stats,
}
Expand description

The output of the register allocator.

Fields

num_spillslots: usize

How many spillslots are needed in the frame?

edits: Vec<(ProgPoint, Edit)>

Edits (insertions or removals). Guaranteed to be sorted by program point.

allocs: Vec<Allocation>

Allocations for each operand. Mapping from instruction to allocations provided by inst_alloc_offsets below.

inst_alloc_offsets: Vec<u32>

Allocation offset in allocs for each instruction.

safepoint_slots: Vec<(ProgPoint, Allocation)>

Safepoint records: at a given program point, a reference-typed value lives in the given Allocation. Currently these are guaranteed to be stack slots, but in the future an option may be added to allow reftype value to be kept in registers at safepoints.

debug_locations: Vec<(u32, ProgPoint, ProgPoint, Allocation)>

Debug info: a labeled value (as applied to vregs by Function::debug_value_labels() on the input side) is located in the given allocation from the first program point (inclusive) to the second (exclusive). Guaranteed to be sorted by label and program point, and the ranges are guaranteed to be disjoint.

stats: Stats

Internal stats from the allocator.

Implementations

Get the allocations assigned to a given instruction.

Returns an iterator over the instructions and edits in a block, in order.

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

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. 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.