[PATCH] D21808: [WebAssembly] Handle debug information and virtual registers without crashing

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 13:44:17 PDT 2016


MatzeB requested changes to this revision.
MatzeB added a reviewer: MatzeB.
This revision now requires changes to proceed.

================
Comment at: lib/CodeGen/LiveIntervalAnalysis.cpp:1316-1326
@@ -1315,11 +1315,13 @@
       SlotIndex LastUse = Before;
       for (MachineOperand &MO : MRI.use_nodbg_operands(Reg)) {
         if (MO.isUndef())
           continue;
         unsigned SubReg = MO.getSubReg();
         if (SubReg != 0 && LaneMask != 0
             && (TRI.getSubRegIndexLaneMask(SubReg) & LaneMask) == 0)
           continue;
 
         const MachineInstr &MI = *MO.getParent();
+        if (MI.isDebugValue())
+          continue;
         SlotIndex InstSlot = LIS.getSlotIndexes()->getInstructionIndex(MI);
----------------
This is a strange change, MRI.use_nodbg_operands() should not return operands of DebugValues (hence the _nodbg_ in the name). Why do you still need to skip them?

================
Comment at: lib/CodeGen/LiveRangeCalc.cpp:187-188
@@ -186,2 +186,4 @@
     SlotIndex UseIdx;
-    if (MI->isPHI()) {
+    if (MI->isDebugValue()) {
+      continue;
+    } else if (MI->isPHI()) {
----------------
This is a strange change, MRI.use_nodbg_operands() should not return operands of DebugValues (hence the _nodbg_ in the name). Why do you still need to skip them?


http://reviews.llvm.org/D21808





More information about the llvm-commits mailing list