diff options
author | Chris Lattner <sabre@nondot.org> | 2006-09-04 18:27:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-09-04 18:27:40 +0000 |
commit | dffb2e83ed2546226d09c40aa43524e2392322da (patch) | |
tree | e21deb034a6895754d97eaae674a7a700765cfd8 /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 5277e4304e9559c13aa42b1d056e828f8f75ff08 (diff) |
Correct fix for a crasher on functions with live in values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30099 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 12b967ba68..5bc03bc957 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -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) |