Make some fixes for LiveInterval repair with debug info. Debug value

MachineInstrs don't have a slot index.

llvm-svn: 175961
This commit is contained in:
Cameron Zwarich 2013-02-23 10:25:25 +00:00
parent ba0bda9739
commit 63acc73f21
2 changed files with 6 additions and 2 deletions

View File

@ -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);

View File

@ -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);
}
}