Fix RA::verifyAssignment()

llvm-svn: 11629
This commit is contained in:
Alkis Evlogimenos 2004-02-19 19:24:17 +00:00
parent c37073f249
commit eed4727191

View File

@ -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);
}
}
}
};