forked from OSchip/llvm-project
Remove VirtRegMap::getRegAllocPref().
Now that there can be multiple hint registers from targets, it doesn't make sense to have a function that returns 'the' preferred register. llvm-svn: 169190
This commit is contained in:
parent
3bcdfc0ec1
commit
084665fa6d
|
@ -126,9 +126,6 @@ namespace llvm {
|
|||
grow();
|
||||
}
|
||||
|
||||
/// @brief returns the register allocation preference.
|
||||
unsigned getRegAllocPref(unsigned virtReg);
|
||||
|
||||
/// @brief returns true if VirtReg is assigned to its preferred physreg.
|
||||
bool hasPreferredPhys(unsigned VirtReg);
|
||||
|
||||
|
|
|
@ -77,17 +77,6 @@ unsigned VirtRegMap::createSpillSlot(const TargetRegisterClass *RC) {
|
|||
return SS;
|
||||
}
|
||||
|
||||
unsigned VirtRegMap::getRegAllocPref(unsigned virtReg) {
|
||||
std::pair<unsigned, unsigned> Hint = MRI->getRegAllocationHint(virtReg);
|
||||
unsigned physReg = Hint.second;
|
||||
if (TargetRegisterInfo::isVirtualRegister(physReg) && hasPhys(physReg))
|
||||
physReg = getPhys(physReg);
|
||||
if (Hint.first == 0)
|
||||
return (TargetRegisterInfo::isPhysicalRegister(physReg))
|
||||
? physReg : 0;
|
||||
return TRI->ResolveRegAllocHint(Hint.first, physReg, *MF);
|
||||
}
|
||||
|
||||
bool VirtRegMap::hasPreferredPhys(unsigned VirtReg) {
|
||||
unsigned Hint = MRI->getSimpleHint(VirtReg);
|
||||
if (!Hint)
|
||||
|
|
Loading…
Reference in New Issue