1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Go to file
Reid Kleckner e8ca9ef5bc [PDB] Add symbol records in bulk
Summary:
This speeds up linking clang.exe/pdb with /DEBUG:GHASH by 31%, from
12.9s to 9.8s.

Symbol records are typically small (16.7 bytes on average), but we
processed them one at a time. CVSymbol is a relatively "large" type. It
wraps an ArrayRef<uint8_t> with a kind an optional 32-bit hash, which we
don't need. Before this change, each DbiModuleDescriptorBuilder would
maintain an array of CVSymbols, and would write them individually with a
BinaryItemStream.

With this change, we now add symbols that happen to appear contiguously
in bulk. For each .debug$S section (roughly one per function), we
allocate two copies, one for relocation, and one for realignment
purposes. For runs of symbols that go in the module stream, which is
most symbols, we now add them as a single ArrayRef<uint8_t>, so the
vector DbiModuleDescriptorBuilder is roughly linear in the number of
.debug$S sections (O(# funcs)) instead of the number of symbol records
(very large).

Some stats on symbol sizes for the curious:
  PDB size: 507M
  sym bytes: 316,508,016
  sym count:  18,954,971
  sym byte avg: 16.7

As future work, we may be able to skip copying symbol records in the
linker for realignment purposes if we make LLVM write them aligned into
the object file. We need to double check that such symbol records are
still compatible with link.exe, but if so, it's definitely worth doing,
since my profile shows we spend 500ms in memcpy in the symbol merging
code. We could potentially cut that in half by saving a copy.
Alternatively, we could apply the relocations *after* we iterate the
symbols. This would require some careful re-engineering of the
relocation processing code, though.

Reviewers: zturner, aganea, ruiu

Subscribers: hiraditya, llvm-commits

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

llvm-svn: 347687
2018-11-27 19:00:23 +00:00
benchmarks Pull google/benchmark library to the LLVM tree 2018-08-28 09:42:41 +00:00
bindings [bindings/go] Add Go bindings to LLVMGetIndices 2018-11-08 04:04:04 +00:00
cmake [Support/FileSystem] Add sub-second precision for atime/mtime of sys::fs::file_status on unix platforms 2018-11-26 00:03:39 +00:00
docs [TableGen] Preprocessing support 2018-11-27 18:57:43 +00:00
examples Fix build break from r347239 2018-11-19 18:51:11 +00:00
include [PDB] Add symbol records in bulk 2018-11-27 19:00:23 +00:00
lib [PDB] Add symbol records in bulk 2018-11-27 19:00:23 +00:00
projects [cmake] Support moving debuginfo-tests to llvm/projects 2017-12-12 17:06:08 +00:00
resources In MSVC builds embed a VERSIONINFO resource in our exe and DLL files. 2015-06-12 15:58:29 +00:00
runtimes Revert "[CMake] Pass Clang defaults to runtimes builds" 2018-07-13 20:01:55 +00:00
test [TableGen] Preprocessing support 2018-11-27 18:57:43 +00:00
tools [cfi] Help sanstats to find binary if they are not at the original location 2018-11-26 21:48:55 +00:00
unittests [Demangle] remove itaniumFindTypesInMangledName 2018-11-27 16:11:24 +00:00
utils [gn build] Merge r347530 to gn. 2018-11-27 06:04:49 +00:00
.arcconfig [llvm] Set up .arcconfig to point to Diffusion L repository 2018-01-12 15:37:41 +00:00
.clang-format
.clang-tidy .clang-tidy: correct style name is 'camelBack' not 'lowerCase'. 2016-09-13 19:04:26 +00:00
.gitattributes [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
.gitignore [git/svn] Ignore Visual Studio's CMakeSettings.json. 2018-10-29 14:51:02 +00:00
CMakeLists.txt [LLVM] Allow modulemap installation 2018-11-21 20:46:50 +00:00
CODE_OWNERS.TXT Add owner for llvm-objcopy 2018-08-09 22:05:19 +00:00
configure Remove autoconf support 2016-01-26 21:29:08 +00:00
CREDITS.TXT add Kang Zhang(shkzhang@cn.ibm.com) to the CREDITS.TXT 2018-11-25 02:56:49 +00:00
LICENSE.TXT Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm.spec.in [Sparc] Implement i64 load/store support for 32-bit sparc. 2015-08-10 19:11:39 +00:00
LLVMBuild.txt
README.txt Test commit. 2018-09-22 01:01:03 +00:00
RELEASE_TESTERS.TXT Adding Yvan as release test backup for Diana 2018-11-08 11:51:27 +00:00

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.