pub struct Slots { /* private fields */ }Expand description
Which cell of the frame every local and every spill slot of a function is in.
Implementations§
Source§impl Slots
impl Slots
Sourcepub fn apart(locals: &[Local], widths: &[u32]) -> Self
pub fn apart(locals: &[Local], widths: &[u32]) -> Self
The frame with nothing sharing anything: a cell of its own for every local and every spill slot, in the order the two lists are in.
This is the layout there was before this pass, and it is what a frame gets when nothing has asked for sharing and what it falls back to on a function with too many slots to pair up cheaply.
The frame with everything that can share sharing, worked out from the allocator’s liveness.
reach is what reach said about this function before the allocator ran, widths is how
many bytes a slot of each of the allocation’s spill slots takes, and locals is the
function’s own objects in the order the lowering recorded them. func is the function the
allocator has finished with, which is asked for the shape of its control flow and nothing
else: the rewrite took the values away but it left every block and every edge where it was.
Sourcepub fn cells(&self) -> &[Cell]
pub fn cells(&self) -> &[Cell]
The cells the frame is made of, which is what crate::frame places.