mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Use MRI::getSimpleHint() instead of getRegAllocPref() in remaining cases.
Targets can provide multiple hints now, so getRegAllocPref() doesn't make sense any longer because it only returns one preferred register. Replace it with getSimpleHint() in the remaining heuristics. This function only git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169188 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -88,6 +88,15 @@ unsigned VirtRegMap::getRegAllocPref(unsigned virtReg) {
|
||||
return TRI->ResolveRegAllocHint(Hint.first, physReg, *MF);
|
||||
}
|
||||
|
||||
bool VirtRegMap::hasPreferredPhys(unsigned VirtReg) {
|
||||
unsigned Hint = MRI->getSimpleHint(VirtReg);
|
||||
if (!Hint)
|
||||
return 0;
|
||||
if (TargetRegisterInfo::isVirtualRegister(Hint))
|
||||
Hint = getPhys(Hint);
|
||||
return getPhys(VirtReg) == Hint;
|
||||
}
|
||||
|
||||
bool VirtRegMap::hasKnownPreference(unsigned VirtReg) {
|
||||
std::pair<unsigned, unsigned> Hint = MRI->getRegAllocationHint(VirtReg);
|
||||
if (TargetRegisterInfo::isPhysicalRegister(Hint.second))
|
||||
|
||||
Reference in New Issue
Block a user