Split getCompileUnitFor{Data,Code}Address.
authorMitch Phillips <31459023+hctim@users.noreply.github.com>
Tue, 7 Mar 2023 19:29:49 +0000 (11:29 -0800)
committerMitch Phillips <31459023+hctim@users.noreply.github.com>
Tue, 7 Mar 2023 20:04:33 +0000 (12:04 -0800)
commit02e8eb1a438bdb1dc9a97aea75a8c9c748048039
tree0f488f811acb84c7862242ad9a66e8054eb02b62
parentb87dc35669929ed29838cc7006c25ef9fa84e6f6
Split getCompileUnitFor{Data,Code}Address.

Getting compile units for data addresses is much slower, as it often
requires a slow fallback path to walk every DWARF entry, as
data addresses don't fall into the compilation unit ranges.

Most lookups are code addresses, and don't need this logic. Split the
functionality out so that we restore the fast-path behaviour for the
code lookups.

More context at:
https://discourse.llvm.org/t/llvm-symbolizer-has-gotten-extremely-slow/67262

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D145009
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp