]> granicus.if.org Git - clang/commit
Modules: Optimize bitcode encoding of diagnostic state
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 14 Mar 2017 19:31:27 +0000 (19:31 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 14 Mar 2017 19:31:27 +0000 (19:31 +0000)
commitc0c27f36da4a6ce9775910c8cb36f4e5688134d5
tree024522ec8abfc51fb53095deab8455cc3082bad4
parent39a6e14e700a451426a24ecbc44261826b3f7353
Modules: Optimize bitcode encoding of diagnostic state

Since bitcode uses VBR encoding, large numbers are more expensive than
small ones.  Instead of emitting a UINT_MAX sentinel after each sequence
of state-change pairs, emit the size of the sequence as a prefix.

This should have no functionality change besides saving bits from the
encoding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297770 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTWriter.cpp