[PATCH] D24786: Bitcode: Prepare to allow multiple modules per bitcode file.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 14:57:37 PDT 2016


pcc created this revision.
pcc added reviewers: mehdi_amini, tejohnson.
pcc added subscribers: llvm-commits, krasin.

As previously mentioned [1] I would like to add the ability for bitcode
files to contain multiple modules. This patch makes some structural changes
to the bitcode format and bitcode writer in preparation for that change.

- Move BitcodeWriter's ownership of its BitstreamWriter to its client and make
  it responsible for emitting a single block rather than an entire bitcode file.
- Move the block info block from the module block to the top level. This will
  let us use the same set of abbreviations in each module.

[1] http://lists.llvm.org/pipermail/llvm-dev/2016-May/099095.html

https://reviews.llvm.org/D24786

Files:
  llvm/lib/Bitcode/Reader/BitcodeReader.cpp
  llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
  llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
  llvm/lib/Bitcode/Writer/ValueEnumerator.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24786.71990.patch
Type: text/x-patch
Size: 18684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160920/c0944db5/attachment.bin>


More information about the llvm-commits mailing list