Implement support for globally associating abbrevs with block IDs, which
authorChris Lattner <sabre@nondot.org>
Sat, 5 May 2007 00:17:00 +0000 (00:17 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 5 May 2007 00:17:00 +0000 (00:17 +0000)
commite17b658c792abd4a1552144b8a8808e44970da76
tree796c80d7cf624353e3088981d7c97df3383a33b6
parenta8e9562906cf70a3e89baaf5fe6e2f4f5cf83c11
Implement support for globally associating abbrevs with block IDs, which
relieves us from having to emit the abbrevs into each instance of the block.
This shrinks kc.bit from 3368K to 3333K, but will be a more significant win
once instructions are abbreviated.

The VST went from:

  Block ID #14 (VALUE_SYMTAB):
      Num Instances: 2345
         Total Size: 1.29508e+07b/1.61885e+06B/404713W
       Average Size: 5522.73b/690.342B/172.585W
          % of file: 48.0645
  Tot/Avg SubBlocks: 0/0
    Tot/Avg Abbrevs: 7035/3
    Tot/Avg Records: 120924/51.5667
      % Abbrev Recs: 100

to:

  Block ID #14 (VALUE_SYMTAB):
      Num Instances: 2345
         Total Size: 1.26713e+07b/1.58391e+06B/395978W
       Average Size: 5403.53b/675.442B/168.86W
          % of file: 47.5198
  Tot/Avg SubBlocks: 0/0
    Tot/Avg Abbrevs: 0/0
    Tot/Avg Records: 120924/51.5667
      % Abbrev Recs: 100

because we didn't emit the same 3 abbrevs 2345 times :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36767 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Bitcode/BitCodes.h
include/llvm/Bitcode/BitstreamReader.h
include/llvm/Bitcode/BitstreamWriter.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp