pub struct Lowered {
pub func: Func,
pub calls: Option<u32>,
}Expand description
A lowered function, and the one thing about it the frame needs that the machine IR does not hold.
Fields§
§func: FuncThe function, in machine instructions.
calls: Option<u32>How many bytes the widest call in the function needs below the stack pointer for the
arguments it passes there, or None for a function that makes no call at all.
Both halves of that are what crate::frame::Layout asks for, and both are answered here
because selection is where a call is built and nothing after it can tell what a call
needed. None is a leaf, which is the function that may use the red zone and the one
whose stack pointer does not have to be left aligned for anybody.
Implementations§
Source§impl Lowered
impl Lowered
Sourcepub fn layout<'a>(&self, base: Layout<'a>) -> Layout<'a>
pub fn layout<'a>(&self, base: Layout<'a>) -> Layout<'a>
The layout given, with the two fields only the lowering knows the answer to filled in.
Everything else in a layout comes from the flags the function is compiled under or from the allocation, so this takes one and returns it rather than building one.