Commit Graph

4 Commits

Author SHA1 Message Date
Peter Collingbourne
6163b4af73 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300464 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-17 17:51:36 +00:00
Peter Collingbourne
a11b564b77 llvm-modextract: Call keep() on the output stream before exiting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 23:13:11 +00:00
Peter Collingbourne
e8971cbe03 Add another missing dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 23:22:55 +00:00
Peter Collingbourne
c67ca17e5e Add llvm-modextract tool.
This program is for testing features that rely on multi-module bitcode files.
It takes a multi-module bitcode file, extracts one of the modules and writes
it to the output file.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288201 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 21:54:33 +00:00