[PATCH] D128212: [DebugInfo] Extend the InstrRef LDV to support DbgValues with many Ops

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 08:43:54 PDT 2022


StephenTozer created this revision.
StephenTozer added reviewers: jmorse, Orlando.
StephenTozer added a project: debug-info.
Herald added a subscriber: hiraditya.
Herald added a project: All.
StephenTozer requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch builds on prior support patches to enable support for variadic debug values in InstrRefLDV, allowing DBG_VALUE_LISTs to have their ranges extended.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128212

Files:
  llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
  llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h


Index: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
===================================================================
--- llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
+++ llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
@@ -977,7 +977,6 @@
   void defVar(const MachineInstr &MI, const DbgValueProperties &Properties,
               const SmallVectorImpl<DbgOpID> &DebugOps) {
     assert(MI.isDebugValue() || MI.isDebugRef());
-    assert(DebugOps.size() <= 1);
     DebugVariable Var(MI.getDebugVariable(), MI.getDebugExpression(),
                       MI.getDebugLoc()->getInlinedAt());
     DbgValue Rec = (DebugOps.size() > 0)
Index: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
===================================================================
--- llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -1322,21 +1322,6 @@
   if (Scope == nullptr)
     return true; // handled it; by doing nothing
 
-  // For now, ignore DBG_VALUE_LISTs when extending ranges. Allow it to
-  // contribute to locations in this block, but don't propagate further.
-  // Interpret it like a DBG_VALUE $noreg.
-  if (MI.isDebugValueList()) {
-    SmallVector<DbgOpID> EmptyDebugOps;
-    SmallVector<ResolvedDbgOp> EmptyResolvedDebugOps;
-    if (VTracker)
-      VTracker->defVar(MI, Properties, EmptyDebugOps);
-    if (TTracker)
-      TTracker->redefVar(MI, Properties, EmptyResolvedDebugOps);
-    return true;
-  }
-
-  const MachineOperand &MO = MI.getDebugOperand(0);
-
   // MLocTracker needs to know that this register is read, even if it's only
   // read by a debug inst.
   for (const MachineOperand &MO : MI.debug_operands())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128212.438421.patch
Type: text/x-patch
Size: 1752 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220620/61d926b2/attachment.bin>


More information about the llvm-commits mailing list