<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Feb 23, 2013 at 2:25 AM, Cameron Zwarich <span dir="ltr"><<a href="mailto:zwarich@apple.com" target="_blank">zwarich@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: zwarich<br>
Date: Sat Feb 23 04:25:25 2013<br>
New Revision: 175961<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=175961&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=175961&view=rev</a><br>
Log:<br>
Make some fixes for LiveInterval repair with debug info. Debug value<br>
MachineInstrs don't have a slot index.<br>
<br>
Modified:<br>
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp<br>
llvm/trunk/lib/CodeGen/SlotIndexes.cpp<br></blockquote><div><br></div><div style>test cases?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=175961&r1=175960&r2=175961&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=175961&r1=175960&r2=175961&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sat Feb 23 04:25:25 2013<br>
@@ -1056,6 +1056,8 @@ LiveIntervals::repairIntervalsInRange(Ma<br>
for (MachineBasicBlock::iterator I = End; I != Begin;) {<br>
--I;<br>
MachineInstr *MI = I;<br>
+ if (MI->isDebugValue())<br>
+ continue;<br>
for (MachineInstr::const_mop_iterator MOI = MI->operands_begin(),<br>
MOE = MI->operands_end(); MOI != MOE; ++MOI) {<br>
if (MOI->isReg() &&<br>
@@ -1087,8 +1089,10 @@ LiveIntervals::repairIntervalsInRange(Ma<br>
for (MachineBasicBlock::iterator I = End; I != Begin;) {<br>
--I;<br>
MachineInstr *MI = I;<br>
- SlotIndex instrIdx = getInstructionIndex(MI);<br>
+ if (MI->isDebugValue())<br>
+ continue;<br>
<br>
+ SlotIndex instrIdx = getInstructionIndex(MI);<br>
bool isStartValid = getInstructionFromIndex(LII->start);<br>
bool isEndValid = getInstructionFromIndex(LII->end);<br>
<br>
<br>
Modified: llvm/trunk/lib/CodeGen/SlotIndexes.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SlotIndexes.cpp?rev=175961&r1=175960&r2=175961&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SlotIndexes.cpp?rev=175961&r1=175960&r2=175961&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/SlotIndexes.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/SlotIndexes.cpp Sat Feb 23 04:25:25 2013<br>
@@ -208,7 +208,7 @@ void SlotIndexes::repairIndexesInRange(M<br>
for (MachineBasicBlock::iterator I = End; I != Begin;) {<br>
--I;<br>
MachineInstr *MI = I;<br>
- if (mi2iMap.find(MI) == mi2iMap.end())<br>
+ if (!MI->isDebugValue() && mi2iMap.find(MI) == mi2iMap.end())<br>
insertMachineInstrInMaps(MI);<br>
}<br>
}<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>