From: Jakob Stoklund Olesen Date: Tue, 4 Dec 2012 00:35:59 +0000 (+0000) Subject: Remove VirtRegMap::getRegAllocPref(). X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=46f6fe7a45964a4aa1c6a0f52b9991af8c30cb0b;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169190 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/VirtRegMap.h b/include/llvm/CodeGen/VirtRegMap.h index f5357a4099a..3bc6ebd563f 100644 --- a/include/llvm/CodeGen/VirtRegMap.h +++ b/include/llvm/CodeGen/VirtRegMap.h @@ -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); diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index 820eed083b7..cd012d29748 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -77,17 +77,6 @@ unsigned VirtRegMap::createSpillSlot(const TargetRegisterClass *RC) { return SS; } -unsigned VirtRegMap::getRegAllocPref(unsigned virtReg) { - std::pair 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)