[PATCH] D102917: [LiveDebugVariables] Stop trimming locations of non-inlined vars
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 21 06:15:42 PDT 2021
djtodoro created this revision.
djtodoro added reviewers: jmorse, Orlando, aprantl, dstenb, avl, rob.lougher.
djtodoro added a project: debug-info.
Herald added subscribers: kerbowa, ormris, atanasyan, jrtc27, hiraditya, nhaehnle, jvesely, nemanjai, sdardis.
djtodoro requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The D35953 <https://reviews.llvm.org/D35953>, D62650 <https://reviews.llvm.org/D62650> and D73691 <https://reviews.llvm.org/D73691> introduced trimming of variables locations in `LiveDebugVariables` pass, since there are some cases where after the `virtregrewrite` we have exploded number of `DBG_VALUEs` created for some inlined variables. As it looks, all problematic cases were regarding inlined variables, so it seems reasonable to stop trimming the location ranges for non-inlined variables. It has very good impact on the llvm-locstats report.
By using GDB 7.11 compiled with `-g -O2` as test bed, the numbers looks as follows:
(before this patch)
$ llvm-locstats ./gdb/gdb
================================================
Debug Location Statistics
================================================
cov% samples percentage(~)
-----------------------------------------------
0% 2621 2%
(0%,10%) 5675 5%
[10%,20%) 5050 4%
[20%,30%) 4997 4%
[30%,40%) 4527 4%
[40%,50%) 4237 4%
[50%,60%) 4679 4%
[60%,70%) 4737 4%
[70%,80%) 5656 5%
[80%,90%) 6481 6%
[90%,100%) 12957 12%
100% 41014 39%
================================================
-the number of debug variables processed: 102631
-PC ranges covered: 56%
-----------------------------------------------
-total availability: 86%
================================================
(after applying this patch)
$ llvm-locstats ./gdb/gdb
================================================
Debug Location Statistics
================================================
cov% samples percentage(~)
-----------------------------------------------
0% 2620 2%
(0%,10%) 5628 5%
[10%,20%) 4972 4%
[20%,30%) 4862 4%
[30%,40%) 4431 4%
[40%,50%) 4109 4%
[50%,60%) 4539 4%
[60%,70%) 4625 4%
[70%,80%) 5517 5%
[80%,90%) 6232 6%
[90%,100%) 10154 9%
100% 44942 43%
================================================
-the number of debug variables processed: 102631
-PC ranges covered: 57%
-----------------------------------------------
-total availability: 86%
================================================
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102917
Files:
llvm/lib/CodeGen/LiveDebugVariables.cpp
llvm/test/CodeGen/AMDGPU/ptr-arg-dbg-value.ll
llvm/test/CodeGen/PowerPC/non-debug-mi-search-frspxsrsp.ll
llvm/test/DebugInfo/MIR/Mips/livedebugvars-stop-trimming-loc.mir
llvm/test/DebugInfo/X86/dbg-addr-dse.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102917.347001.patch
Type: text/x-patch
Size: 9012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210521/b7862916/attachment.bin>
More information about the llvm-commits
mailing list