diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-12 00:33:28 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-12 00:33:28 +0000 |
commit | 165473247f3569bf2985abd3244b3e0c69290698 (patch) | |
tree | 220a5b7aad87f393af58d158de167d6b06313bbf /llvm/lib/CodeGen/RegAllocBase.cpp | |
parent | 1a362fbb8621ed85c0b4f611c5f1e4aaba6b210b (diff) | |
download | bcm5719-llvm-165473247f3569bf2985abd3244b3e0c69290698.tar.gz bcm5719-llvm-165473247f3569bf2985abd3244b3e0c69290698.zip |
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!
llvm-svn: 156685
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocBase.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBase.cpp b/llvm/lib/CodeGen/RegAllocBase.cpp index b00eceb17f1..b8d1d185e9f 100644 --- a/llvm/lib/CodeGen/RegAllocBase.cpp +++ b/llvm/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"); } |