[PATCH] D46739: [DebugInfo] Only handle DBG_VALUE in InlineSpiller

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 15 20:01:14 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL332427: [DebugInfo] Only handle DBG_VALUE in InlineSpiller. (authored by shiva, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D46739?vs=146272&id=146988#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D46739

Files:
  llvm/trunk/lib/CodeGen/InlineSpiller.cpp


Index: llvm/trunk/lib/CodeGen/InlineSpiller.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/InlineSpiller.cpp
+++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp
@@ -617,9 +617,12 @@
       MachineInstr &MI = *RegI++;
 
       // Debug values are not allowed to affect codegen.
-      if (MI.isDebugInstr())
+      if (MI.isDebugValue())
         continue;
 
+      assert(!MI.isDebugInstr() && "Did not expect to find a use in debug "
+             "instruction that isn't a DBG_VALUE");
+
       anyRemat |= reMaterializeFor(LI, MI);
     }
   }
@@ -933,15 +936,18 @@
     MachineInstr *MI = &*(RegI++);
 
     // Debug values are not allowed to affect codegen.
-    if (MI->isDebugInstr()) {
+    if (MI->isDebugValue()) {
       // Modify DBG_VALUE now that the value is in a spill slot.
       MachineBasicBlock *MBB = MI->getParent();
       LLVM_DEBUG(dbgs() << "Modifying debug info due to spill:\t" << *MI);
       buildDbgValueForSpill(*MBB, MI, *MI, StackSlot);
       MBB->erase(MI);
       continue;
     }
 
+    assert(!MI->isDebugInstr() && "Did not expect to find a use in debug "
+           "instruction that isn't a DBG_VALUE");
+
     // Ignore copies to/from snippets. We'll delete them.
     if (SnippetCopies.count(MI))
       continue;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46739.146988.patch
Type: text/x-patch
Size: 1305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180516/7268ba3b/attachment.bin>


More information about the llvm-commits mailing list