Implemented optimization for BatchEmitOwnedPtrs that we only emit one complete
authorTed Kremenek <kremenek@apple.com>
Sat, 17 Nov 2007 00:40:45 +0000 (00:40 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 17 Nov 2007 00:40:45 +0000 (00:40 +0000)
commit04ab82a8068c0eb735b663cd77a8d2f7c5bcbefd
treeb57c5c111b3a23b617be0a29a9b08a633dedc14c
parent81a038218171860ee4c382849c647d3dc841fe8b
Implemented optimization for BatchEmitOwnedPtrs that we only emit one complete
SerializedPtrID, followed by the *differences* in IDs. The big idea is that
most IDs will be just be 1 off from the previous (either that or NULL, which
we encode as a difference if 0), so this will greatly reduce the encoding
space for extra IDs to just 1 bit per pointer.

So far this optimization reduces serialization of Carbon.h by only 1%, but
we aren't using any abbreviations now in the Bitcode file to properly take
advantage of this optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44199 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Bitcode/Deserialize.h
include/llvm/Bitcode/Serialize.h