diff options
author | Cameron Zwarich <zwarich@apple.com> | 2013-02-23 10:25:25 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2013-02-23 10:25:25 +0000 |
commit | 79f5ab1931e5abf6e9c304db25e50d592dd8f5b8 (patch) | |
tree | df20c68664fd54ab88691488e0c19fca1a9f7d8b | |
parent | b4bd022731b28a80f59818870cc7df5d4771d793 (diff) |
Make some fixes for LiveInterval repair with debug info. Debug value
MachineInstrs don't have a slot index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175961 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 6 | ||||
-rw-r--r-- | lib/CodeGen/SlotIndexes.cpp | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index a716e8bbab..22b35d5271 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -1056,6 +1056,8 @@ LiveIntervals::repairIntervalsInRange(MachineBasicBlock *MBB, 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(MachineBasicBlock *MBB, 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); diff --git a/lib/CodeGen/SlotIndexes.cpp b/lib/CodeGen/SlotIndexes.cpp index f2937941ee..20049a89d1 100644 --- a/lib/CodeGen/SlotIndexes.cpp +++ b/lib/CodeGen/SlotIndexes.cpp @@ -208,7 +208,7 @@ void SlotIndexes::repairIndexesInRange(MachineBasicBlock *MBB, 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); } } |