Displaying 1 result from an estimated 1 matches for "finalizealloc".
2017 Jun 05
3
VirtRegMap invariant: no reserved physical registers?
...nsigned VirtReg = MO.getReg();
unsigned PhysReg = VRM->getPhys(VirtReg);
...
assert(!MRI->isReserved(PhysReg) && "Reserved register assignment");
Indeed there is a case where PhysReg may be a reserved physical register. Specificially, RegAllocPBQP::finalizeAlloc() may select a physical register thusly:
const TargetRegisterClass &RC = *MRI.getRegClass(LI.reg);
PReg = RC.getRawAllocationOrder(MF).front();
...
VRM.assignVirt2Phys(LI.reg, PReg);
The documentation for TargetRegisterClass::getRawAllocationOrder() notes that the collec...