aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunctionAnalysis.cpp
diff options
context:
space:
mode:
authorjeffreytan81 <jeffreytan@meta.com>2024-10-29 20:42:54 -0700
committerGitHub <noreply@github.com>2024-10-29 20:42:54 -0700
commitcb04d3378096b83e5e357490ff8b1c479f34c469 (patch)
tree62846c996dbebfd127599a7238a917016d3feb67 /llvm/lib/CodeGen/MachineFunctionAnalysis.cpp
parent0d94c7b5ceb84b33b50c8e7b1fa66e9996a29373 (diff)
downloadllvm-cb04d3378096b83e5e357490ff8b1c479f34c469.zip
llvm-cb04d3378096b83e5e357490ff8b1c479f34c469.tar.gz
llvm-cb04d3378096b83e5e357490ff8b1c479f34c469.tar.bz2
Improve namespace lookup using .debug_names parent chain (#110062)
## Summary This PR is a continuation of https://github.com/llvm/llvm-project/pull/108907 by using `.debug_names` parent chain faster lookup for namespaces. ## Implementation Similar to https://github.com/llvm/llvm-project/pull/108907. This PR adds a new API: `GetNamespacesWithParents` in `DWARFIndex` base class. The API performs the same function as `GetNamespaces()` with additional filtering using parents `CompilerDeclContext`. A default implementation is given in `DWARFIndex` class which parses debug info and performs the matching. In the `DebugNameDWARFIndex` override, parents `CompilerDeclContext` is cross checked with parent chain in `.debug_names` for much faster filtering before fallback to base implementation for final filtering. ## Performance Results For the same benchmark used in https://github.com/llvm/llvm-project/pull/108907, this PR improves: 48s => 28s --------- Co-authored-by: jeffreytan81 <jeffreytan@fb.com>
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunctionAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions