[DWARF][NFC] add ParentIdx and SiblingIdx to DWARFDebugInfoEntry for faster navigation.
authorAlexey Lapshin <a.v.lapshin@mail.ru>
Thu, 23 Sep 2021 09:26:25 +0000 (12:26 +0300)
committerAlexey Lapshin <a.v.lapshin@mail.ru>
Sat, 2 Oct 2021 05:11:06 +0000 (08:11 +0300)
commit0b8c50812b598a989aa5cc5b42c3be6f9a2bd465
tree1eac6fe6a2ec086b442415b27c342c1cacd9154b
parent237d18a61a97e963c7757bc878f38aee31508de5
[DWARF][NFC] add ParentIdx and SiblingIdx to DWARFDebugInfoEntry for faster navigation.

This patch implements suggestion done while reviewing D102634. It adds two fields:
ParentIdx and SiblingIdx. These fields allow fast navigation to die parent and
die sibling. These fields are set at the moment when dies are loaded.

dsymutil works 2% faster with this patch(run on clang binary).

Differential Revision: https://reviews.llvm.org/D110363
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h
llvm/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp
llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
llvm/unittests/DebugInfo/DWARF/DWARFDieManualExtractTest.cpp