[PATCH] D105280: [2/2][RemoveRedundantDebugValues] Introduce a MIR pass that removes redundant DBG_VALUEs
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 1 06:51:15 PDT 2021
djtodoro created this revision.
djtodoro added reviewers: jmorse, Orlando, aprantl, dstenb.
djtodoro added a project: debug-info.
Herald added subscribers: hiraditya, nemanjai.
djtodoro requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch adds the forward scan for finding redundant `DBG_VALUEs`.
This analysis aims to remove redundant `DBG_VALUEs` by going forward
in the basic block by considering the first `DBG_VALUE` as a valid
until its first (location) operand is not clobbered/modified.
For example:
(1) DBG_VALUE $edi, !"var1", ...
(2) <block of code that does affect $edi>
(3) DBG_VALUE $edi, !"var1", ...
...
in this case, we can remove (3).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105280
Files:
llvm/lib/CodeGen/RemoveRedundantDebugValues.cpp
llvm/test/CodeGen/PowerPC/non-debug-mi-search-frspxsrsp.ll
llvm/test/DebugInfo/MIR/X86/remove-redundant-dbg-vals.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105280.355863.patch
Type: text/x-patch
Size: 7595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210701/a9da7107/attachment.bin>
More information about the llvm-commits
mailing list