diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-12-04 00:35:59 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-12-04 00:35:59 +0000 |
commit | 084665fa6d3d62dd61c5f8edd09281f5787f5ccc (patch) | |
tree | a9fcd297634846dfea79754a65909a68eda9813b | |
parent | 3bcdfc0ec19df671655eeedb10da2ff9399b8b65 (diff) | |
download | bcm5719-llvm-084665fa6d3d62dd61c5f8edd09281f5787f5ccc.tar.gz bcm5719-llvm-084665fa6d3d62dd61c5f8edd09281f5787f5ccc.zip |
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
-rw-r--r-- | llvm/include/llvm/CodeGen/VirtRegMap.h | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/VirtRegMap.cpp | 11 |
2 files changed, 0 insertions, 14 deletions
diff --git a/llvm/include/llvm/CodeGen/VirtRegMap.h b/llvm/include/llvm/CodeGen/VirtRegMap.h index f5357a4099a..3bc6ebd563f 100644 --- a/llvm/include/llvm/CodeGen/VirtRegMap.h +++ b/llvm/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/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp index 820eed083b7..cd012d29748 100644 --- a/llvm/lib/CodeGen/VirtRegMap.cpp +++ b/llvm/lib/CodeGen/VirtRegMap.cpp @@ -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) |