Do not dereference end iterators. It hurts when you do that.

llvm-svn: 14474
This commit is contained in:
Chris Lattner 2004-06-29 06:56:51 +00:00
parent 1a920d49f6
commit 49b34f3f51
1 changed files with 2 additions and 3 deletions

View File

@ -356,8 +356,7 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock* mbb,
}
// a variable can only be killed by subsequent instructions
do {
++mi;
for (++mi; mi != e; ++mi) {
baseIndex += InstrSlots::NUM;
for (KillIter ki = lv_->killed_begin(mi), ke = lv_->killed_end(mi);
ki != ke; ++ki) {
@ -367,7 +366,7 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock* mbb,
goto exit;
}
}
} while (mi != e);
}
exit:
assert(start < end && "did not find end of interval?");