OSDN Git Service

[lld/pdb] Speed up construction of publics & globals addr map.
authorZachary Turner <zturner@google.com>
Mon, 21 Aug 2017 20:08:40 +0000 (20:08 +0000)
committerZachary Turner <zturner@google.com>
Mon, 21 Aug 2017 20:08:40 +0000 (20:08 +0000)
commita3268784908fb1d74d7896a207bbe12cc99f865a
tree6b7a19d7508405464869e133e89c9cd598611b09
parent25ef265dc91724da4987f81fdf66ea3147192eeb
[lld/pdb] Speed up construction of publics & globals addr map.

computeAddrMap function calls std::stable_sort with a comparison
function that computes deserialized symbols every time its called.
In the result deserializeAs<PublicSym32> is called 20-30 times per
symbol. It's much faster to calculate it beforehand and pass a
pointer to it to the comparison function.

Patch by Alex Telishev
Differential Revision: https://reviews.llvm.org/D36941

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311373 91177308-0d34-0410-b5e6-96231b3b80d8
lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp