[DWARF][Verifier] Do not add child DieRangeInfo with empty address range to the parent.
authorAlexey Lapshin <a.v.lapshin@mail.ru>
Wed, 4 Aug 2021 16:17:33 +0000 (19:17 +0300)
committerAlexey Lapshin <a.v.lapshin@mail.ru>
Sun, 22 Aug 2021 16:39:21 +0000 (19:39 +0300)
commit07d44cc0b14765732c6ca37e534ed34935ab2d6e
tree672f2d9cb8453d7bd6fd2402899156deab2dd1c7
parent40fd2d93c0ac694dce49e1d52f585752d011d884
[DWARF][Verifier] Do not add child DieRangeInfo with empty address range to the parent.

verifyDieRanges function checks for the intersected address ranges.
It adds child DieRangeInfo into parent DieRangeInfo to check
whether children have overlapping address ranges. It is safe to not add
DieRangeInfo with empty address range into parent's children list.
This decreases the number of children which should be navigated and as a result
decreases execution time(parents having a lot of children with empty ranges
spend much time navigating them). For this command: "llvm-dwarfdump --verify clang-repl"
execution time decreased from 220 sec till 75 sec.

Differential Revision: https://reviews.llvm.org/D107554
llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
llvm/test/tools/llvm-dwarfdump/X86/verify_cu_ranges.yaml [new file with mode: 0644]
llvm/test/tools/llvm-dwarfdump/X86/verify_parent_zero_length.yaml [new file with mode: 0644]