[all-commits] [llvm/llvm-project] c1a7c5: [MC] Eliminate two symbol-related hash maps (#95464)
aengelke via All-commits
all-commits at lists.llvm.org
Thu Jun 20 02:36:33 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c1a7c5ac73af92316426deed5f8f10f33f729ad2
https://github.com/llvm/llvm-project/commit/c1a7c5ac73af92316426deed5f8f10f33f729ad2
Author: aengelke <engelke at in.tum.de>
Date: 2024-06-20 (Thu, 20 Jun 2024)
Changed paths:
M bolt/lib/Passes/BinaryPasses.cpp
M llvm/include/llvm/MC/MCContext.h
M llvm/include/llvm/MC/MCSymbol.h
M llvm/include/llvm/MC/MCSymbolCOFF.h
M llvm/include/llvm/MC/MCSymbolELF.h
M llvm/include/llvm/MC/MCSymbolGOFF.h
M llvm/include/llvm/MC/MCSymbolMachO.h
A llvm/include/llvm/MC/MCSymbolTableEntry.h
M llvm/include/llvm/MC/MCSymbolWasm.h
M llvm/include/llvm/MC/MCSymbolXCOFF.h
M llvm/lib/MC/MCContext.cpp
M llvm/lib/MC/MCParser/AsmParser.cpp
M llvm/lib/MC/MCParser/MasmParser.cpp
M llvm/lib/MC/MCSymbol.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
Log Message:
-----------
[MC] Eliminate two symbol-related hash maps (#95464)
Previously, a symbol insertion requires (at least) three hash table
operations:
- Lookup/create entry in Symbols (main symbol table)
- Lookup NextUniqueID to deduplicate identical temporary labels
- Add entry to UsedNames, which is also used to serve as storage for the
symbol name in the MCSymbol.
All three lookups are done with the same name, so combining these into a
single table reduces the number of lookups to one. Thus, a pointer to a
symbol table entry can be passed to createSymbol to avoid a duplicate
lookup of the same name.
The new symbol table entry value is placed in a separate header to avoid
including MCContext in MCSymbol or vice versa.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list