diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-03-25 14:40:18 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-03-25 14:40:18 +0000 |
commit | fdbf0a5af805b764927bd8b38da89ddffc67f531 (patch) | |
tree | 5f0610fb25f0524b13474cf0c1a339893c424687 /llvm/test/Bitcode | |
parent | 59bcbba6b4cf513068cef5fb7cd3d7aad8f5fb5e (diff) | |
download | bcm5719-llvm-fdbf0a5af805b764927bd8b38da89ddffc67f531.tar.gz bcm5719-llvm-fdbf0a5af805b764927bd8b38da89ddffc67f531.zip |
Bitcode: Collect all MDString records into a single blob
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 strings.
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.
llvm-svn: 264409
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r-- | llvm/test/Bitcode/Inputs/invalid-fixme-streaming-blob.bc | bin | 371 -> 0 bytes | |||
-rw-r--r-- | llvm/test/Bitcode/invalid.test | 5 |
2 files changed, 0 insertions, 5 deletions
diff --git a/llvm/test/Bitcode/Inputs/invalid-fixme-streaming-blob.bc b/llvm/test/Bitcode/Inputs/invalid-fixme-streaming-blob.bc Binary files differdeleted file mode 100644 index 7e32f8b0774..00000000000 --- a/llvm/test/Bitcode/Inputs/invalid-fixme-streaming-blob.bc +++ /dev/null diff --git a/llvm/test/Bitcode/invalid.test b/llvm/test/Bitcode/invalid.test index 3425adc8410..499320140d7 100644 --- a/llvm/test/Bitcode/invalid.test +++ b/llvm/test/Bitcode/invalid.test @@ -168,11 +168,6 @@ RUN: FileCheck --check-prefix=INVALID-ARGUMENT-TYPE %s INVALID-ARGUMENT-TYPE: Invalid function argument type -RUN: not llvm-dis -disable-output %p/Inputs/invalid-fixme-streaming-blob.bc 2>&1 | \ -RUN: FileCheck --check-prefix=STREAMING-BLOB %s - -STREAMING-BLOB: getPointer in streaming memory objects not allowed - RUN: not llvm-dis -disable-output %p/Inputs/invalid-function-comdat-id.bc 2>&1 | \ RUN: FileCheck --check-prefix=INVALID-FCOMDAT-ID %s |