[PATCH] D79173: [Debuginfo][NFC] Avoid double calling of DWARFDie::find(DW_AT_name).

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 06:53:24 PDT 2020


avl created this revision.
avl added reviewers: clayborg, dblaikie, JDevlieghere.
avl added projects: LLVM, debug-info.
Herald added subscribers: hiraditya, aprantl.

Current implementation of DWARFDie::getName(DINameKind Kind) could
lead to double call to DWARFDie::find(DW_AT_name) in following
scenario:

getName(LinkageName);
getName(ShortName);

getName(LinkageName) calls find(DW_AT_name) if linkage name is not
found. Then, it is called again in getName(ShortName). This patch
alows to request LinkageName and ShortName separately
to avoid extra call to find(DW_AT_name).

It helps D74169 <https://reviews.llvm.org/D74169> to parse clang debuginfo faster(~1%).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79173

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h
  llvm/lib/DWARFLinker/DWARFLinker.cpp
  llvm/lib/DWARFLinker/DWARFLinkerDeclContext.cpp
  llvm/lib/DebugInfo/DWARF/DWARFDie.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79173.261215.patch
Type: text/x-patch
Size: 4200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200430/b350a3e9/attachment-0001.bin>


More information about the llvm-commits mailing list