MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / alloc_for

Function alloc_for

crates/ir-to-asm/src/compiler/register_allocator.rs:157–162  ·  view source on GitHub ↗
(func: &IrFunction)

Source from the content-addressed store, hash-verified

155
156 fn alloc_for(func: &IrFunction) -> FunctionContext {
157 let mut ctx = FunctionContext::new(&StdHashMap::new());
158 assign_stack_slots(func, &mut ctx, &StdHashMap::new(), true, false);
159 ctx.finalize();
160 ctx
161 }
162
163 #[test]
164 fn scalar_values_get_callee_saved_registers() {
165 let mut func = IrFunction::new("main", i64_ty());

Calls 2

assign_stack_slotsFunction · 0.85
finalizeMethod · 0.45