[PATCH] D56788: [DebugInfo][InstCombine] Prefer salvaging dbg.values over sinking them
Jeremy Morse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 12 08:32:56 PST 2019
jmorse updated this revision to Diff 186479.
jmorse marked 2 inline comments as done.
jmorse added a comment.
Herald added a subscriber: jdoerfert.
The issue with generating new DW_OP_derefs has been resolved by r353824, as a result we no longer change existing tests with this patch.
I realised at the same time that we should be emitting undef dbg.values at this stage: if we sink a dbg.value and cannot salvage it, then we should terminate any earlier location range. Trying the clang-3.4 build statistics I get the following results based on r353832 (note that the llvm-dwarfdump --statistics formula changed recently). First column variables-with-location coverage, second scope-bytes-covered.
r353832: 76.9%, 44.8%
salvage, no undef: 77.2%, 44.9%
salvage and undef: 77.2%, 45.5%
Adding the undefs loses 300 variable locations (0.008%), and yields 0.6% more scope bytes covered. Exactly where the scope-bytes-covered improvement comes from is a bit of a mystery to me, but it's an improvement nonetheless.
Note that I've added a reverse() on the iteration over DbgUsers... without this, the order of some dbg.values in Transforms/InstCombine/debuginfo_add.ll swap (!25 and !26). I.. don't really have a good explanation as to why.
CHANGES SINCE LAST ACTION
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5567 bytes
Desc: not available
More information about the llvm-commits