[PATCH] D70548: [llvm-dwarfdump][Statistics] Unify coverage statistic computation

Kristina Bessonova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 24 09:42:18 PST 2019


krisb added a comment.

In D70548#1756279 <https://reviews.llvm.org/D70548#1756279>, @djtodoro wrote:

> @krisb Thanks for working on this!
>
> Let me summarize this quickly.
>
> This will remove mixing between calculation against enclosing and adjusted scope. We have concluded the adjustment heuristics are confusing and wrong in many cases, so we are giving up on that. The alternative is to generate the `DW_AT_start_scope` attribute, that represents exactly the adjusted scope, and having that we will be able to calculate the debug location statistics for the pieces of code where the variable is alive.


Thanks for summarizing this! This is perfectly correct.

In D70548#1756279 <https://reviews.llvm.org/D70548#1756279>, @djtodoro wrote:

> WDYT how "easy" will be to implement the `DW_AT_start_scope` attribute? I know that it might not be used anywhere else, but I think that having location statistics against variable's life will be very useful thing.


I haven't investigated the subject in detail, but my initial guess is that life range may be computed as a union of basic blocks or their parts that 1) belong to the enclosing scope and 2) have debug value instructions that describe the variable (either with a valid location or with an undef). It looks easy to implement, but for practical use, it's probably too rough. I'm going to take another look a bit later.

In D70548#1756669 <https://reviews.llvm.org/D70548#1756669>, @djtodoro wrote:

> Please refactor the `llvm/utils/llvm-locstats/llvm-locstats.py` as well (there are variables containing `*FromFirstDefinition`).


Thanks! Fixed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70548





More information about the llvm-commits mailing list