diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-19 19:24:17 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-19 19:24:17 +0000 |
commit | d195e99bc8c6ca5fed506239e298d023df20e942 (patch) | |
tree | 43b8f584252db3e49ec3a703f83199ff6bbba8bf /lib/CodeGen/RegAllocLinearScan.cpp | |
parent | d368c6163a54190c852838b370a62a86caafde3a (diff) |
Fix RA::verifyAssignment()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index a1d9a116de..67adeb5e7e 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -210,13 +210,17 @@ namespace { void verifyAssignment() const { for (Virt2PhysMap::const_iterator i = v2pMap_.begin(), e = v2pMap_.end(); i != e; ++i) - for (Virt2PhysMap::const_iterator i2 = i; i2 != e; ++i2) - if (mri_->areAliases(i->second, i2->second)) { + for (Virt2PhysMap::const_iterator i2 = next(i); i2 != e; ++i2) + if (MRegisterInfo::isVirtualRegister(i->second) && + (i->second == i2->second || + mri_->areAliases(i->second, i2->second))) { const LiveIntervals::Interval &in = li_->getInterval(i->second), &in2 = li_->getInterval(i2->second); - assert(!in.overlaps(in2) && - "overlapping intervals for same register!"); + if (in.overlaps(in2)) { + std::cerr << in << " overlaps " << in2 << '\n'; + assert(0); + } } } }; |