#pragma once #include #include "ir.h" struct allocation_record { bool spill; int reg; // only used if spill == false }; struct allocation { int numregs; struct allocation_record *allocs; }; struct allocation* regalloc(const struct ir *ir); void allocation_delete(struct allocation *alloc);