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

Kristina Bessonova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 21 10:05:18 PST 2019


krisb created this revision.
krisb added reviewers: djtodoro, aprantl, vsk, dblaikie, avl.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The patch removes OffsetToFirstDefinition in the 'scope bytes total'
statistic computation. Thus it unifies the way the scope and the coverage
buckets are computed. The rationals behind that are the following:

1. OffsetToFirstDefinition was used to calculate the variable's life range.

However, there is no simple way to do it accurately, so the scope calculated
this way might be misleading. See D69027 <https://reviews.llvm.org/D69027> for more details on the subject.

2. Both 'scope bytes total' and coverage buckets seem to be intended

to represent the same data in different ways. Otherwise, the statistics
might be controversial and confusing.

Note that the approach gives up a thorough evaluation of debug information
completeness (i.e. coverage buckets by themselves doesn't tell how good
the debug information is). Only changes in coverage over time make
a 'physical' sense.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70548

Files:
  llvm/test/tools/llvm-dwarfdump/X86/locstats.ll
  llvm/test/tools/llvm-dwarfdump/X86/statistics-base-address.s
  llvm/test/tools/llvm-dwarfdump/X86/statistics-dwo.test
  llvm/test/tools/llvm-dwarfdump/X86/statistics-v3.test
  llvm/test/tools/llvm-dwarfdump/X86/statistics.ll
  llvm/tools/llvm-dwarfdump/Statistics.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70548.230482.patch
Type: text/x-patch
Size: 13813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191121/95112693/attachment.bin>


More information about the llvm-commits mailing list