Add abbreviations to the TYPE_BLOCK for pointers, functions, structs and arrays.
authorChris Lattner <sabre@nondot.org>
Sat, 5 May 2007 06:30:12 +0000 (06:30 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 5 May 2007 06:30:12 +0000 (06:30 +0000)
commitd092e0e18f9139bfb00acfae2444679b76bd9c59
tree9ec7ccb642ffa4cd8f8de10efe61cc8ed9ddae2c
parentc42e226f08106834d5743208e38c42861dacae55
Add abbreviations to the TYPE_BLOCK for pointers, functions, structs and arrays.
This shrinks the type_block of kc++ from 139901 bits to 99389 bits (0.55% to 0.39%
of the file), a 40% reduction.

This shrink the record from:

  Block ID #10 (TYPE_BLOCK):
      Num Instances: 1
         Total Size: 139901b/17487.6B/4371.91W
          % of file: 0.549306
        Num Abbrevs: 0
        Num Records: 3203
      % Abbrev Recs: 0

to:

  Block ID #10 (TYPE_BLOCK):
      Num Instances: 1
         Total Size: 99389b/12423.6B/3105.91W
          % of file: 0.390862
        Num Abbrevs: 4
        Num Records: 3203
      % Abbrev Recs: 99.6566

With a common histogram of:

       Code Histogram:
                1613    POINTER
                1100    FUNCTION
                255     STRUCT
                224     ARRAY
                5       INTEGER
                2       OPAQUE
                1       LABEL
                1       DOUBLE
                1       VOID
                1       NUMENTRY

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36776 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Writer/BitcodeWriter.cpp