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
sourceimpl Output
impl Output
sourcepub fn inst_allocs(&self, inst: Inst) -> &[Allocation]
pub fn inst_allocs(&self, inst: Inst) -> &[Allocation]
Get the allocations assigned to a given instruction.
sourcepub fn block_insts_and_edits(
&self,
func: &impl Function,
block: Block
) -> OutputIter<'_>ⓘNotable traits for OutputIter<'a>impl<'a> Iterator for OutputIter<'a> type Item = InstOrEdit<'a>;
pub fn block_insts_and_edits(
&self,
func: &impl Function,
block: Block
) -> OutputIter<'_>ⓘNotable traits for OutputIter<'a>impl<'a> Iterator for OutputIter<'a> type Item = InstOrEdit<'a>;
Returns an iterator over the instructions and edits in a block, in order.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
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