[PATCH] D102219: Optimize GSymCreator::finalize.
Simon Giesecke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 11 00:38:32 PDT 2021
simon.giesecke created this revision.
simon.giesecke added reviewers: echristo, clayborg.
Herald added a subscriber: hiraditya.
simon.giesecke requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The algorithm removing duplicates from the Funcs list used to have
amortized quadratic time complexity because it was potentially
removing each entry using std::vector::erase individually. This
patch is now using a erase-remove idiom with an adapted
removeIfBinary algorithm.
Probably this was made under the assumption that these removals are
rare, but there are cases where the case of duplicate entries is
occurring frequently. In these cases, the actual runtime was very
poor, taking hours to process a single binary of around 1 GiB size
including debug info. Another factor contributing to that is the
frequent output of the warning, which is now removed.
It seems this is particularly an issue with GCC-compiled binaries,
rather than clang-built binaries.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102219
Files:
llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102219.344304.patch
Type: text/x-patch
Size: 6241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210511/c9729b7a/attachment.bin>
More information about the llvm-commits
mailing list