[llvm-commits] [llvm] r56410 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp

Owen Anderson resistor at mac.com
Sun Sep 21 13:43:25 PDT 2008


Author: resistor
Date: Sun Sep 21 15:43:24 2008
New Revision: 56410

URL: http://llvm.org/viewvc/llvm-project?rev=56410&view=rev
Log:
Fetch the starting index of the block when assigning intervals.  This gets live-in indices
correct in the presence of things like EH labels.

Modified:
    llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp

Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=56410&r1=56409&r2=56410&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sun Sep 21 15:43:24 2008
@@ -678,12 +678,12 @@
   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();





More information about the llvm-commits mailing list