The D35953, D62650 and 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% ================================================
Nit -- un-necessary newline