[PATCH] D69027: [llvm-dwarfdump][Statistics] Fix calculation of OffsetToFirstDefinition
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 18 03:04:14 PDT 2019
avl added a comment.
I think OffsetToFirstDefinition should not be taken into account at all.
i.e., coverage should be calculated against block scope, not against variable scope(which is unknown).
If we have the following case:
DW_TAG_lexical_block
DW_AT_ranges (0x00000000
[0x000000000000010, 0x0000000000000197))
DW_TAG_variable
DW_AT_location (0x0000018e
[0x0000000000000183, 0x0000000000000197): DW_OP_reg0 RAX)
And then will create a fix which improves debug info in such a way:
DW_TAG_lexical_block
DW_AT_ranges (0x00000000
[0x000000000000010, 0x0000000000000197))
DW_TAG_variable
DW_AT_location (0x0000018e
[0x0000000000000100, 0x0000000000000183): DW_OP_reg1 RBX)
[0x0000000000000183, 0x0000000000000197): DW_OP_reg0 RAX)
In both cases reported statistic there would be 100%.
That hides original low coverage for that variable and makes invisible performed improvement.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69027/new/
https://reviews.llvm.org/D69027
More information about the llvm-commits
mailing list