Commit Graph

6 Commits

Author SHA1 Message Date
Eugene Zelenko 975293f0e5 [Bitcode] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 312760
2017-09-07 23:28:24 +00:00
Peter Collingbourne a0f371a106 Bitcode: Add a string table to the bitcode format.
Add a top-level STRTAB block containing a string table blob, and start storing
strings for module codes FUNCTION, GLOBALVAR, ALIAS, IFUNC and COMDAT in
the string table.

This change allows us to share names between globals and comdats as well
as between modules, and improves the efficiency of loading bitcode files by
no longer using a bit encoding for symbol names. Once we start writing the
irsymtab to the bitcode file we will also be able to share strings between
it and the module.

On my machine, link time for Chromium for Linux with ThinLTO decreases by
about 7% for no-op incremental builds or about 1% for full builds. Total
bitcode file size decreases by about 3%.

As discussed on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2017-April/111732.html

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

llvm-svn: 300464
2017-04-17 17:51:36 +00:00
Vedant Kumar bb35249308 Avoid some string copies, NFC
llvm-svn: 299993
2017-04-11 22:11:46 +00:00
Peter Collingbourne 98d40e0557 llvm-cat: Allow bitcode files to be created with no modules.
llvm-svn: 289610
2016-12-13 23:14:55 +00:00
Peter Collingbourne 9303efb0af Add missing dependency.
llvm-svn: 288198
2016-11-29 21:02:19 +00:00
Peter Collingbourne 5a0a2e648c Bitcode: Introduce BitcodeWriter interface.
This interface allows clients to write multiple modules to a single
bitcode file. Also introduce the llvm-cat utility which can be used
to create a bitcode file containing multiple modules.

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

llvm-svn: 288195
2016-11-29 20:43:47 +00:00