[llvm] [PDB] Refactor cache strategy for function symbol lookups (PR #188927)
Haohai Wen via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 20:10:45 PDT 2026
================
@@ -355,29 +366,67 @@ SymbolCache::findFunctionSymbolBySectOffset(uint32_t Sect, uint32_t Offset) {
consumeError(ExpectedModS.takeError());
return nullptr;
}
- CVSymbolArray Syms = ExpectedModS->getSymbolArray();
- // Search for the symbol in this module.
+ // Return empty intervals in AddressToSymbolId from Start to Stop.
+ auto getInsertRanges = [this](uint64_t Start, uint64_t Stop) {
----------------
HaohaiWen wrote:
Yes. this usually return 1 or 0 range.
Two functions can be fully overlapped. This is prevalent especially when ICF is on.
I have never seen two functions range partially overlapped. However I'm not sure whether this is a valid real case.
This algorithm should be efficient for all of those cases.
https://github.com/llvm/llvm-project/pull/188927
More information about the llvm-commits
mailing list