[PATCH] D57511: [DebugInfo] Stop changing labels for parameter DBG_VALUEs

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 1 07:35:00 PST 2019


dstenb added a comment.

In D57511#1379750 <https://reviews.llvm.org/D57511#1379750>, @aprantl wrote:

> Does this have a noticeable effect on the debug info size?


I will check this.

> Do we know about any remaining bugs where the first DBG_VALUE comes after the prologue_end and we would have a valid location at prologue_end? With constants perhaps? If yes, this would be a noticeable usability regression. Otherwise this just improves accuracy, which is always great.

I reverted this patch (but kept D57510 <https://reviews.llvm.org/D57510>), and added the following patch (https://reviews.llvm.org/D57587) which prints whether or not the debug values that `beginFunction()` move are inside the prologue (using the same check as `DwarfDebug`'s `findPrologueEndLoc()`).

I built a RelWithDebInfo-profiled Clang trunk binary with X86 as target using the above.

This resulted in the following numbers:

  $ grep prologue a.log | sort | uniq -c
     4301   $noreg outside prologue
   220636   already inside prologue
       37   other type of value outside prologue
      813   reg value outside prologue

As seen, we have some `$noreg` debug values for parameters that are placed outside the prologue. Not moving those to the top of the function shouldn't affect the value in the debugger (it should be "unavailable" either way), but I guess that it may result in more location lists (I haven't verified this yet). For other values ("other type of value" in the table above), e.g. constants, this situation seems rare, only happening 37 times in a Clang build.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57511/new/

https://reviews.llvm.org/D57511





More information about the llvm-commits mailing list