[llvm-commits] [llvm] r169190 - in /llvm/trunk: include/llvm/CodeGen/VirtRegMap.h lib/CodeGen/VirtRegMap.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Dec 3 16:36:00 PST 2012
Author: stoklund
Date: Mon Dec 3 18:35:59 2012
New Revision: 169190
URL: http://llvm.org/viewvc/llvm-project?rev=169190&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/CodeGen/VirtRegMap.h
llvm/trunk/lib/CodeGen/VirtRegMap.cpp
Modified: llvm/trunk/include/llvm/CodeGen/VirtRegMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/VirtRegMap.h?rev=169190&r1=169189&r2=169190&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/VirtRegMap.h (original)
+++ llvm/trunk/include/llvm/CodeGen/VirtRegMap.h Mon Dec 3 18:35:59 2012
@@ -126,9 +126,6 @@
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);
Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegMap.cpp?rev=169190&r1=169189&r2=169190&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/VirtRegMap.cpp (original)
+++ llvm/trunk/lib/CodeGen/VirtRegMap.cpp Mon Dec 3 18:35:59 2012
@@ -77,17 +77,6 @@
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)
More information about the llvm-commits
mailing list