summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-04 18:27:40 +0000
committerChris Lattner <sabre@nondot.org>2006-09-04 18:27:40 +0000
commit1eed04d1fbac4d81b66a0651d33152bb0ee5fa73 (patch)
tree3a20c1f6181e99b39a2a6240db6423466199098f /llvm/lib/CodeGen
parentbff0b5969f31203865f4e6600bb612cde69694a5 (diff)
downloadbcm5719-llvm-1eed04d1fbac4d81b66a0651d33152bb0ee5fa73.tar.gz
bcm5719-llvm-1eed04d1fbac4d81b66a0651d33152bb0ee5fa73.zip
Correct fix for a crasher on functions with live in values
llvm-svn: 30099
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 12b967ba682..5bc03bc9576 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud