[PATCH] D12536: Function bitcode index in Value Symbol Table and lazy reading support

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 10:53:51 PDT 2015


tejohnson created this revision.
tejohnson added reviewers: dexonsmith, davidxl, joker.eph.
tejohnson added a subscriber: llvm-commits.

Support for including the function bitcode indices in the Value Symbol
Table. This requires writing the VST after the function blocks, which in
turn requires a new VST forward declaration record encoding the offset of
the full VST (which is backpatched to contain the offset after the VST
is written).

This patch also enables the lazy function reader to use the new function
indices out of the VST. This support will be used by ThinLTO as well, which
will be in a follow on patch. Backwards compatibility with older bitcode
files is maintained.

A new test is also included.

The bitcode format (used for the lazy reader as well as the upcoming
ThinLTO patches) came out of discussions with Duncan and others and is
described here:
https://drive.google.com/file/d/0B036uwnWM6RWdnBLakxmeDdOeXc/view

http://reviews.llvm.org/D12536

Files:
  include/llvm/Bitcode/BitstreamReader.h
  include/llvm/Bitcode/BitstreamWriter.h
  include/llvm/Bitcode/LLVMBitCodes.h
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  test/Bitcode/vst-forward-declaration.ll
  tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12536.33710.patch
Type: text/x-patch
Size: 28914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150901/176e8cb2/attachment.bin>


More information about the llvm-commits mailing list