[PATCH] D114578: [DebugInfo][InstrRef] Permit and track variable assignments in out-of-scope blocks
Jeremy Morse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 25 06:52:22 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG102d2a8a9905: [DebugInfo][InstrRef] Track variable assignments in out-of-scope blocks (authored by jmorse).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114578/new/
https://reviews.llvm.org/D114578
Files:
llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
llvm/test/DebugInfo/X86/stack-value-dwarf2.ll
Index: llvm/test/DebugInfo/X86/stack-value-dwarf2.ll
===================================================================
--- llvm/test/DebugInfo/X86/stack-value-dwarf2.ll
+++ llvm/test/DebugInfo/X86/stack-value-dwarf2.ll
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=obj -o - %s -experimental-debug-variable-locations=false | llvm-dwarfdump -debug-loc - | FileCheck %s
+; RUN: llc -filetype=obj -o - %s -experimental-debug-variable-locations=true | llvm-dwarfdump -debug-loc - | FileCheck %s
; Note that it would be even better to avoid emitting the empty piece.
; CHECK: {{.*}}: DW_OP_piece 0x8{{$}}
Index: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
===================================================================
--- llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -2487,11 +2487,10 @@
// "blocks that are potentially in scope. See comment at start of vlocJoin.
SmallPtrSet<const MachineBasicBlock *, 8> InScopeBlocks = BlocksToExplore;
- // Old LiveDebugValues tracks variable locations that come out of blocks
- // not in scope, where DBG_VALUEs occur. This is something we could
- // legitimately ignore, but lets allow it for now.
- if (EmulateOldLDV)
- BlocksToExplore.insert(AssignBlocks.begin(), AssignBlocks.end());
+ // VarLoc LiveDebugValues tracks variable locations that are defined in
+ // blocks not in scope. This is something we could legitimately ignore, but
+ // lets allow it for now for the sake of coverage.
+ BlocksToExplore.insert(AssignBlocks.begin(), AssignBlocks.end());
// We also need to propagate variable values through any artificial blocks
// that immediately follow blocks in scope.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114578.389772.patch
Type: text/x-patch
Size: 1727 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211125/b6f760d3/attachment.bin>
More information about the llvm-commits
mailing list