[PATCH] D102634: Calculate indexes of last child of each DWARF entry once during tryExtractDIEsIfNeeded.

Simon Giesecke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 09:12:00 PDT 2021


simon.giesecke created this revision.
simon.giesecke added reviewers: clayborg, dblaikie.
simon.giesecke added a project: debug-info.
Herald added subscribers: arphaman, hiraditya.
simon.giesecke requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This ensures that the last child indexes are calculated in linear time and
can later be queried in constant time by getLastChild.

      

The baseline situation was that individual calls to getLastChild were linear in the
size of DieArray. Calling getLastChild once for every DWARFDebugInfoEntry was
amortized quadratic in the size of DieArray.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102634

Files:
  llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
  llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102634.345907.patch
Type: text/x-patch
Size: 4046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210517/845c8fd7/attachment.bin>


More information about the llvm-commits mailing list