Go to file
Zachary Turner fed467eefb [CV Type Merging] Find nested type indices faster.
Merging two type streams is one of the most time consuming
parts of generating a PDB, and as such it needs to be as
fast as possible.  The visitor abstractions used for interoperating
nicely with many different types of inputs and outputs have
been used widely and help greatly for testability and implementing
tools, but the abstractions build up and get in the way of
performance.

This patch removes all of the visitation stuff from the type
stream merger, essentially re-inventing the leaf / member switch
and loop, but at a very low level.  This allows us many other
optimizations, such as not actually deserializing *any* records
(even member records which don't describe their own length), as
the operation of "figure out how long this record is" is somewhat
faster than "figure out how long this record *and* get all its
fields out".  Furthermore, whereas before we had to deserialize,
re-write type indices, then re-serialize, now we don't have to
do any of those 3 steps.  We just find out where the type indices
are and pull them directly out of the byte stream and re-write
them.

This is worth a 50-60% performance increase.  On top of all other
optimizations that have been applied this week, I now get the
following numbers when linking lld.exe and lld.pdb

MSVC: 25.67s
Before This Patch: 18.59s
After This Patch: 8.92s

So this is a huge performance win.

Differential Revision: https://reviews.llvm.org/D33564

llvm-svn: 303935
2017-05-25 23:36:16 +00:00
clang "*" => "+" to avoid matching on empty string. 2017-05-25 23:25:36 +00:00
clang-tools-extra Earlier revert introduced an extra space, remove it. 2017-05-25 20:29:17 +00:00
compiler-rt [asan] relax sanbox_read_proc_self_maps_test to pass even if unshare() fails. 2017-05-25 20:50:36 +00:00
debuginfo-tests Add a test for PR33166. 2017-05-25 19:33:16 +00:00
libclc math: Implement sinh function 2017-02-25 02:46:53 +00:00
libcxx Correct typo: LIBCXXABI_BUILTINS_LIBRARY -> LIBCXX_BUILTINS_LIBRARY 2017-05-25 22:43:42 +00:00
libcxxabi [Demangler] Remove a failing assert introduced in r303718 2017-05-24 20:53:13 +00:00
libunwind [libunwind] Fix executable stack directive on Linux. 2017-05-16 20:18:57 +00:00
lld When uncompressing sections, remove SHF_COMPRESSED bits. NFC. 2017-05-25 22:00:36 +00:00
lldb Fix bug #28898 2017-05-25 20:12:30 +00:00
llgo benchcomp: Add a mode for analyzing file sizes. 2017-04-03 19:13:12 +00:00
llvm [CV Type Merging] Find nested type indices faster. 2017-05-25 23:36:16 +00:00
openmp Fix for KMP_AFFINITY=respect with multiple processor groups 2017-05-15 19:05:59 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly Drop newline in docs builder to see if Polly docs are updated 2017-05-25 05:38:05 +00:00