aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocLocal.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-15 21:37:17 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-15 21:37:17 +0000
commit859a18b5833f3566799313ecba8db4916500485b (patch)
treec55bb63da95ee65735adb5281b2ed94487cb6417 /lib/CodeGen/RegAllocLocal.cpp
parent843b160a2040b3ec4d3452678450afa11704c473 (diff)
Make dense maps keyed on physical registers smallerusing
MRegisterInfo::getNumRegs() instead of MRegisterInfo::FirstVirtualRegister. Also use MRegisterInfo::is{Physical,Virtual}Register where appropriate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r--lib/CodeGen/RegAllocLocal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp
index f9abd68e14..1ca7f0c440 100644
--- a/lib/CodeGen/RegAllocLocal.cpp
+++ b/lib/CodeGen/RegAllocLocal.cpp
@@ -53,7 +53,7 @@ namespace {
std::vector<unsigned> Virt2PhysRegMap;
unsigned &getVirt2PhysRegMapSlot(unsigned VirtReg) {
- assert(VirtReg >= MRegisterInfo::FirstVirtualRegister &&"Illegal VREG #");
+ assert(MRegisterInfo::isVirtualRegister(VirtReg) &&"Illegal VREG #");
assert(VirtReg-MRegisterInfo::FirstVirtualRegister <Virt2PhysRegMap.size()
&& "VirtReg not in map!");
return Virt2PhysRegMap[VirtReg-MRegisterInfo::FirstVirtualRegister];