Correct fix for a crasher on functions with live in values

llvm-svn: 30099
This commit is contained in:
Chris Lattner 2006-09-04 18:27:40 +00:00
parent bff0b5969f
commit 1eed04d1fb
1 changed files with 6 additions and 4 deletions

View File

@ -613,15 +613,17 @@ void LiveIntervals::computeIntervals() {
DEBUG(std::cerr << ((Value*)mbb->getBasicBlock())->getName() << ":\n");
MachineBasicBlock::iterator mi = mbb->begin(), miEnd = mbb->end();
if (IgnoreFirstInstr) { ++mi; IgnoreFirstInstr = false; }
if (IgnoreFirstInstr) {
++mi;
IgnoreFirstInstr = false;
MIIndex += InstrSlots::NUM;
}
for (; mi != miEnd; ++mi) {
const TargetInstrDescriptor& tid =
tm_->getInstrInfo()->get(mi->getOpcode());
DEBUG(std::cerr << MIIndex << "\t" << *mi);
// FIXME: Why is this needed?
MIIndex = getInstructionIndex(mi);
// handle implicit defs
if (tid.ImplicitDefs) {
for (const unsigned* id = tid.ImplicitDefs; *id; ++id)