[llvm] r175961 - Make some fixes for LiveInterval repair with debug info. Debug value

Cameron Zwarich zwarich at apple.com
Sat Feb 23 02:25:26 PST 2013


Author: zwarich
Date: Sat Feb 23 04:25:25 2013
New Revision: 175961

URL: http://llvm.org/viewvc/llvm-project?rev=175961&view=rev
Log:
Make some fixes for LiveInterval repair with debug info. Debug value
MachineInstrs don't have a slot index.

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

Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=175961&r1=175960&r2=175961&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sat Feb 23 04:25:25 2013
@@ -1056,6 +1056,8 @@ LiveIntervals::repairIntervalsInRange(Ma
   for (MachineBasicBlock::iterator I = End; I != Begin;) {
     --I;
     MachineInstr *MI = I;
+    if (MI->isDebugValue())
+      continue;
     for (MachineInstr::const_mop_iterator MOI = MI->operands_begin(),
          MOE = MI->operands_end(); MOI != MOE; ++MOI) {
       if (MOI->isReg() &&
@@ -1087,8 +1089,10 @@ LiveIntervals::repairIntervalsInRange(Ma
     for (MachineBasicBlock::iterator I = End; I != Begin;) {
       --I;
       MachineInstr *MI = I;
-      SlotIndex instrIdx = getInstructionIndex(MI);
+      if (MI->isDebugValue())
+        continue;
 
+      SlotIndex instrIdx = getInstructionIndex(MI);
       bool isStartValid = getInstructionFromIndex(LII->start);
       bool isEndValid = getInstructionFromIndex(LII->end);
 

Modified: llvm/trunk/lib/CodeGen/SlotIndexes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SlotIndexes.cpp?rev=175961&r1=175960&r2=175961&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SlotIndexes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SlotIndexes.cpp Sat Feb 23 04:25:25 2013
@@ -208,7 +208,7 @@ void SlotIndexes::repairIndexesInRange(M
   for (MachineBasicBlock::iterator I = End; I != Begin;) {
     --I;
     MachineInstr *MI = I;
-    if (mi2iMap.find(MI) == mi2iMap.end())
+    if (!MI->isDebugValue() && mi2iMap.find(MI) == mi2iMap.end())
       insertMachineInstrInMaps(MI);
   }
 }





More information about the llvm-commits mailing list