aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authoraengelke <engelke@in.tum.de>2024-06-20 11:36:11 +0200
committerGitHub <noreply@github.com>2024-06-20 11:36:11 +0200
commitc1a7c5ac73af92316426deed5f8f10f33f729ad2 (patch)
tree267c89e4ae2b34b97035a1fd6a7ec8f44ec7eec8 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent919c547130cfd1cd75ccf148cbf2334b27b2f37f (diff)
downloadllvm-c1a7c5ac73af92316426deed5f8f10f33f729ad2.zip
llvm-c1a7c5ac73af92316426deed5f8f10f33f729ad2.tar.gz
llvm-c1a7c5ac73af92316426deed5f8f10f33f729ad2.tar.bz2
[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.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions