pub struct Allocation {
pub assignment: Assignment,
pub edits: Vec<Edit>,
pub order: Order,
pub live: Live,
}Expand description
What allocating a function produced.
The moves are handed back rather than written into the function because a move is an
instruction and an instruction belongs to a target, which spec/10-backend.md section 10.8
says this crate holds nothing of. The consumer turns each one into whatever its target moves a
register with.
Fields§
§assignment: AssignmentWhere every value of the function went, which is what the frame layout reads.
edits: Vec<Edit>The moves the places do not already make true, in the order they have to be made in.
order: OrderThe line the function was laid out in while it was allocated, which the liveness below is counted along.
live: LiveWhere every value was live.
Handed back rather than dropped because the stack slot allocator shares one run of bytes
between two things that are never both wanted, and the only liveness that knows where a
spilled value is wanted is the one the spilling was decided from. Working a second one out
afterwards would cost a pass and would be free to disagree with this one.
spec/optimizer/36-lowering-and-isel.md section 36.7 asks for the one answer.
Trait Implementations§
Source§impl Clone for Allocation
impl Clone for Allocation
Source§fn clone(&self) -> Allocation
fn clone(&self) -> Allocation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more