summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocBase.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2017-07-24 18:07:55 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2017-07-24 18:07:55 +0000
commit5fbc87021e15f0a4044ecdd5ce5ff0d9a7f83c4a (patch)
tree9c9c637de4e63599d5ceb19281edb33a21ecd95b /llvm/lib/CodeGen/RegAllocBase.cpp
parent8bbb130793c1495adbfcd528ba6a87026c47d076 (diff)
downloadbcm5719-llvm-5fbc87021e15f0a4044ecdd5ce5ff0d9a7f83c4a.tar.gz
bcm5719-llvm-5fbc87021e15f0a4044ecdd5ce5ff0d9a7f83c4a.zip
RA: Replace asserts related to empty live intervals
These don't exactly assert the same thing anymore, and allow empty live intervals with non-empty uses. Removed in r308808 and r308813. llvm-svn: 308906
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBase.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocBase.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBase.cpp b/llvm/lib/CodeGen/RegAllocBase.cpp
index 5a80bd95d6e..7b4fbace2c1 100644
--- a/llvm/lib/CodeGen/RegAllocBase.cpp
+++ b/llvm/lib/CodeGen/RegAllocBase.cpp
@@ -133,11 +133,13 @@ void RegAllocBase::allocatePhysRegs() {
if (AvailablePhysReg)
Matrix->assign(*VirtReg, AvailablePhysReg);
- for (VirtRegVec::iterator I = SplitVRegs.begin(), E = SplitVRegs.end();
- I != E; ++I) {
- LiveInterval *SplitVirtReg = &LIS->getInterval(*I);
+ for (unsigned Reg : SplitVRegs) {
+ assert(LIS->hasInterval(Reg));
+
+ LiveInterval *SplitVirtReg = &LIS->getInterval(Reg);
assert(!VRM->hasPhys(SplitVirtReg->reg) && "Register already assigned");
if (MRI->reg_nodbg_empty(SplitVirtReg->reg)) {
+ assert(SplitVirtReg->empty() && "Non-empty but used interval");
DEBUG(dbgs() << "not queueing unused " << *SplitVirtReg << '\n');
aboutToRemoveInterval(*SplitVirtReg);
LIS->removeInterval(SplitVirtReg->reg);
OpenPOWER on IntegriCloud