void GreedyAllocator::informSnapshot(LInstruction *ins) { LSnapshot *snapshot = ins->snapshot(); for (size_t i = 0; i < snapshot->numEntries(); i++) { LAllocation *a = snapshot->getEntry(i); if (!a->isUse()) continue; // Every definition in a snapshot gets a stack slot. This // simplification means we can treat normal snapshots and LOsiPoint // snapshots (which follow calls) the same, without adding a special // exception to note that registers are spilled at the LOsiPoint. VirtualRegister *vr = getVirtualRegister(a->toUse()); allocateStack(vr); *a = vr->backingStack(); } }