summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocBase.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-12 00:33:28 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-12 00:33:28 +0000
commit2b3fa322b8788e62e28bc6989a53737bf9483437 (patch)
treea5d04628d96861552ac46b5a8ac7b4fdd3e37a7d /lib/CodeGen/RegAllocBase.cpp
parent27ba61df9f9decc70124b7559f777ad596dfda29 (diff)
downloadllvm-2b3fa322b8788e62e28bc6989a53737bf9483437.tar.gz
llvm-2b3fa322b8788e62e28bc6989a53737bf9483437.tar.bz2
llvm-2b3fa322b8788e62e28bc6989a53737bf9483437.tar.xz
Don't look for empty live ranges in the unions.
Empty live ranges represent undef and still get allocated, but they won't appear in LiveIntervalUnions. Patch by Patrik Hägglund! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocBase.cpp')
-rw-r--r--lib/CodeGen/RegAllocBase.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocBase.cpp b/lib/CodeGen/RegAllocBase.cpp
index b00eceb17f..b8d1d185e9 100644
--- a/lib/CodeGen/RegAllocBase.cpp
+++ b/lib/CodeGen/RegAllocBase.cpp
@@ -69,11 +69,14 @@ void RegAllocBase::verify() {
for (LiveIntervals::iterator liItr = LIS->begin(), liEnd = LIS->end();
liItr != liEnd; ++liItr) {
unsigned reg = liItr->first;
+ LiveInterval* li = liItr->second;
if (TargetRegisterInfo::isPhysicalRegister(reg)) continue;
if (!VRM->hasPhys(reg)) continue; // spilled?
+ if (li->empty()) continue; // unionVRegs will only be filled if li is
+ // non-empty
unsigned PhysReg = VRM->getPhys(reg);
if (!unionVRegs[PhysReg].test(reg)) {
- dbgs() << "LiveVirtReg " << reg << " not in union " <<
+ dbgs() << "LiveVirtReg " << PrintReg(reg, TRI) << " not in union " <<
TRI->getName(PhysReg) << "\n";
llvm_unreachable("unallocated live vreg");
}