diff options
| author | Owen Anderson <resistor@mac.com> | 2008-09-21 20:43:24 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2008-09-21 20:43:24 +0000 |
| commit | f9817737ba964da17010b77fc2c2ec52c36c28fe (patch) | |
| tree | f31746c68927a94e049bc34666ed37c8e0d5a443 | |
| parent | 1659476b8ad97985ff3c4fff02f39018582f2e5f (diff) | |
| download | external_llvm-f9817737ba964da17010b77fc2c2ec52c36c28fe.zip external_llvm-f9817737ba964da17010b77fc2c2ec52c36c28fe.tar.gz external_llvm-f9817737ba964da17010b77fc2c2ec52c36c28fe.tar.bz2 | |
Fetch the starting index of the block when assigning intervals. This gets live-in indices
correct in the presence of things like EH labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56410 91177308-0d34-0410-b5e6-96231b3b80d8
| -rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 2a23d49..e0ff198 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -678,12 +678,12 @@ void LiveIntervals::computeIntervals() { DOUT << "********** COMPUTING LIVE INTERVALS **********\n" << "********** Function: " << ((Value*)mf_->getFunction())->getName() << '\n'; - // Track the index of the current machine instr. - unsigned MIIndex = 0; for (MachineFunction::iterator MBBI = mf_->begin(), E = mf_->end(); MBBI != E; ++MBBI) { MachineBasicBlock *MBB = MBBI; + // Track the index of the current machine instr. + unsigned MIIndex = getMBBStartIdx(MBB); DOUT << ((Value*)MBB->getBasicBlock())->getName() << ":\n"; MachineBasicBlock::iterator MI = MBB->begin(), miEnd = MBB->end(); |
