aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
diff options
context:
space:
mode:
authorJob Noorman <jnoorman@igalia.com>2023-08-29 09:02:20 +0200
committerJob Noorman <jnoorman@igalia.com>2023-08-29 09:21:02 +0200
commitfe0e804a4ef4fdf0ae7b2654ad4ac8d1cfafec60 (patch)
tree1200d4a176eccb3ed7f043b9db3946d02078eae9 /clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
parente5d8160040f69d9084e89260eec85f98038611b5 (diff)
downloadllvm-fe0e804a4ef4fdf0ae7b2654ad4ac8d1cfafec60.zip
llvm-fe0e804a4ef4fdf0ae7b2654ad4ac8d1cfafec60.tar.gz
llvm-fe0e804a4ef4fdf0ae7b2654ad4ac8d1cfafec60.tar.bz2
[JITLink][NFC] Store external symbols in a StringMap
External symbols used to be stored in a `DenseSet`. An `assert` in `addExternalSymbol` ensures that names of external symbols are unique. However, for objects containing a huge number of external symbols, this `assert` can be a performance bottleneck. This patch proposes to store external symbols in a `StringMap` instead making it significantly cheaper to check if a certain symbol name already exists. This issue came up while porting BOLT to JITLink (D147544): linking a large binary using the JITLink port turned out to be about 4x slower than the current version of BOLT that uses RuntimeDyld. This slowdown was caused entirely by the `assert` in `addExternalSymbol`. Using this patch, the JITLink port is slightly faster than RuntimeDyld. Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D150874
Diffstat (limited to 'clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp')
0 files changed, 0 insertions, 0 deletions