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§
source§impl 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<'_> ⓘ
pub fn block_insts_and_edits( &self, func: &impl Function, block: Block, ) -> OutputIter<'_> ⓘ
Returns an iterator over the instructions and edits in a block, in order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
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: 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
)