[PATCH] D31838: Bitcode: Add a string table to the bitcode format.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 11:06:53 PDT 2017
pcc created this revision.
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
Depends on https://reviews.llvm.org/D31828
Depends on https://reviews.llvm.org/D31829
https://reviews.llvm.org/D31838
Files:
llvm/docs/BitCodeFormat.rst
llvm/include/llvm/Bitcode/BitcodeReader.h
llvm/include/llvm/Bitcode/BitcodeWriter.h
llvm/include/llvm/Bitcode/LLVMBitCodes.h
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
llvm/test/Bitcode/thinlto-alias.ll
llvm/test/Bitcode/thinlto-function-summary-callgraph-pgo.ll
llvm/test/Bitcode/thinlto-function-summary-callgraph-profile-summary.ll
llvm/test/Bitcode/thinlto-function-summary-callgraph.ll
llvm/test/Bitcode/thinlto-function-summary-originalnames.ll
llvm/test/Bitcode/thinlto-function-summary-refgraph.ll
llvm/test/Bitcode/thinlto-function-summary.ll
llvm/test/ThinLTO/X86/autoupgrade.ll
llvm/test/ThinLTO/X86/distributed_indexes.ll
llvm/test/tools/gold/X86/thinlto.ll
llvm/test/tools/llvm-lto/thinlto.ll
llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
llvm/tools/llvm-cat/llvm-cat.cpp
llvm/tools/llvm-modextract/llvm-modextract.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31838.94580.patch
Type: text/x-patch
Size: 77144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170410/b06eeaa9/attachment-0001.bin>
More information about the llvm-commits
mailing list