[PATCH] Bitcode: Collect all MDString records into a single blob
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 24 16:21:13 PDT 2016
> On 2016-Mar-24, at 16:05, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> Optimize output of MDStrings in bitcode. This emits them in big blocks
> (currently 1024) in a pair of records:
> - BULK_STRING_SIZES: the sizes of the strings in the block, and
> - BULK_STRING_DATA: a single blob, which is the concatenation of all the
> Inspired by Mehdi's similar patch, http://reviews.llvm.org/D18342, this
> should (a) slightly reduce bitcode size, since there is less record
> overhead, and (b) greatly improve reading speed, since blobs are super
> cheap to deserialize.
> I needed to add support for blobs to streaming input to get the test
> suite passing.
> - StreamingMemoryObject::getPointer reads ahead and returns the address
> of the blob.
> - To avoid a possible reallocation of StreamingMemoryObject::Bytes,
> BitstreamCursor::readRecord needs to move the call to JumpToEnd
> forward so that getPointer is the last bitstream operation.
That didn't compile, due to a last minute variable rename :/.
Try this one.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 17329 bytes
Desc: not available
More information about the llvm-commits