[PATCH] D106856: [LiveDebugValues] Cleanup Transfers when removing Entry Value Location
Nikola Tesic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 27 02:12:21 PDT 2021
ntesic created this revision.
ntesic added reviewers: djtodoro, aprantl, dstenb, jmorse, Orlando.
ntesic added a project: debug-info.
Herald added subscribers: ormris, hiraditya.
ntesic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
If we encounter a new debug value, describing the same parameter, we should stop tracking
the parameter's Entry Value. At that point, in some cases, the Transfer which uses the parameter's
Entry Value, is already emitted. Thanks to the RemoveRedundantDebugValues pass, many problems with
incorrect instruction order and number of DBG_VALUEs are fixed. However, we still cannot rely on the
rule that each new debug value is set by the previous non-debug instruction in Machine Basic Block.
When new parameter debug value triggers removal of Backup Entry Value for the same parameter,
do the cleanup of Transfers emitted from Backup Entry Values.
Get the Transfer Instruction which created the new debug value and search for debug values already
emitted from the to-be-deleted Backup Entry Value and attached to the Transfer Instruction.
If found, delete the Transfer and remove "primary" Entry Value Var Loc from OpenRanges.
This patch fixes PR47628 <https://bugs.llvm.org/show_bug.cgi?id=47628>.
https://reviews.llvm.org/D106856
Files:
llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
llvm/test/DebugInfo/MIR/X86/backup-entry-values-usage.mir
llvm/test/DebugInfo/MIR/X86/dbgcall-site-reference.mir
llvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106856.361945.patch
Type: text/x-patch
Size: 22789 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210727/11ad97bc/attachment.bin>
More information about the llvm-commits
mailing list