[PATCH] D96045: [llvm-dwarfdump][locstats] Unify handling of inlined vars with no loc

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 08:26:06 PST 2021


djtodoro created this revision.
djtodoro added reviewers: dblaikie, jmorse, aprantl.
djtodoro added a project: LLVM.
Herald added a reviewer: jhenderson.
Herald added a subscriber: cmtice.
djtodoro requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.

The presence or absence of an inline variable (as well as formal parameter) with only an `abstract_origin` ref (without `DW_AT_location`) should not change the location coverage.
It means, for both:

  DW_TAG_inlined_subroutine
                DW_AT_abstract_origin (0x0000004e "f")
                DW_AT_low_pc  (0x0000000000000010)
                DW_AT_high_pc (0x0000000000000013)
    DW_TAG_formal_parameter
                DW_AT_abstract_origin       (0x0000005a "b")
    NULL

and

  DW_TAG_inlined_subroutine
              DW_AT_abstract_origin (0x0000004e "f")
              DW_AT_low_pc  (0x0000000000000010)
              DW_AT_high_pc (0x0000000000000013)
  NULL

we should report 0% location coverage. If we add DW_AT_location, for both cases the coverage should be improved.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96045

Files:
  llvm/test/tools/llvm-dwarfdump/X86/locstats-for-inlined-vars.yaml
  llvm/tools/llvm-dwarfdump/Statistics.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96045.321444.patch
Type: text/x-patch
Size: 15248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210204/2e035019/attachment.bin>


More information about the llvm-commits mailing list