[PATCH] D101064: [WIP] improve debug-info in stack-slot-coloring

Markus Lavin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 29 01:05:59 PDT 2021


markus added a comment.

In D101064#2722608 <https://reviews.llvm.org/D101064#2722608>, @jmorse wrote:

> Looks good as a starting place -- I took this for  test drive, see inline comments. On a clang-3.4 build, the "PC ranges covered" statistic ticks down from 66% to 65%, however I believe that's due to rounding. Using llvm-locstats, roughly six thousand variables move out of the 100% covered bucket, or about 0.2% of all variables in clang-3.4. 0% covered goes up by a negligible amount. In my opinion: this is a reasonable sacrifice to make in the name of accuracy, and some of those dropped locations will be incorrect. Plus, there's a longer term plan for not needing this.

Doesn't sound too bad then. Thanks for testing!

> The LiveIntervals range only identifies spans of instructions: it doesn't contain any information about control flow. There can be scenarios where a stack slot goes out of liveness but doesn't get terminated by this implementation: for example, when we branch out of of a block, the branch target might be somewhere where the slot isn't live.

That is a good point and I actually had not thought about that. I guess it is not too hard to fix though as one can; look for branches leaving these LiveIntervals and terminate at the point of the branch target is that is not also live.

Should be enough right?

> Seeing how this is a pragmatic fix to eliminate some false locations, I don't think we need to cover all circumstances with a patch like this -- up to you if you want to cover the extra scenarios.

I will give it a try.


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

https://reviews.llvm.org/D101064



More information about the llvm-commits mailing list