1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

188 Commits

Author SHA1 Message Date
Chris Lattner
6d0c5eb739 add a denser encoding for null terminated strings, add a 6-bit abbrev as
well.  This shrinks kc++ from 2724088 to 2717360 bytes.

llvm-svn: 36821
2007-05-06 00:53:07 +00:00
Chris Lattner
34b256e1a6 implement the 'string constant' optimization. This shrinks kc.bit from
2878544 to 2815788

llvm-svn: 36818
2007-05-06 00:35:24 +00:00
Chris Lattner
9818d0a7e6 fix a bug I introduced when I merged some code together
llvm-svn: 36813
2007-05-05 23:40:48 +00:00
Chris Lattner
7d16cb364d minor bugfix
llvm-svn: 36777
2007-05-05 07:20:34 +00:00
Chris Lattner
cedc5577f2 add a 6-bit encoding type for strings.
llvm-svn: 36770
2007-05-05 01:15:42 +00:00
Chris Lattner
eca2bb1334 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 :)

llvm-svn: 36767
2007-05-05 00:17:00 +00:00
Chris Lattner
e2b2272c53 use a template to eliminate manual code duplication
llvm-svn: 36757
2007-05-04 20:40:50 +00:00
Chris Lattner
75b84adf6b add support for array abbreviations.
llvm-svn: 36754
2007-05-04 20:33:47 +00:00
Chris Lattner
a4aa2e9b7a eliminate lengths from record bodies
llvm-svn: 36751
2007-05-04 19:10:48 +00:00
Chris Lattner
4e0c6003b7 minor cleanups. Add provisions for a new standard BLOCKINFO_BLOCK
block type.

llvm-svn: 36748
2007-05-04 18:25:49 +00:00
Chris Lattner
f0086ffafa refcount BitCodeAbbrev objects
llvm-svn: 36747
2007-05-04 17:35:19 +00:00
Chris Lattner
bb8d1755f6 remove unused code
llvm-svn: 36727
2007-05-04 03:01:46 +00:00
Chris Lattner
2d0c97d9a1 add new codes
llvm-svn: 36725
2007-05-04 03:00:00 +00:00
Chris Lattner
43c70c8404 add a new code
llvm-svn: 36703
2007-05-03 22:16:11 +00:00
Chris Lattner
79333821da update to reflect reality
llvm-svn: 36643
2007-05-02 05:47:22 +00:00
Chris Lattner
21e0d64a6e several bitfixes to JumpToBit
llvm-svn: 36616
2007-05-01 05:51:32 +00:00
Chris Lattner
eb2a5f5f99 add JumpToBit, an explicit init method, and a default ctor.
llvm-svn: 36613
2007-05-01 04:59:06 +00:00
Chris Lattner
92eca49c3f add missing opcode.
llvm-svn: 36608
2007-05-01 02:12:05 +00:00
Chris Lattner
31d1dec66d add some helpers
llvm-svn: 36580
2007-04-29 21:49:05 +00:00
Chris Lattner
8a40d39a8e compute this value correctly
llvm-svn: 36575
2007-04-29 19:49:58 +00:00
Chris Lattner
d61ccde429 add a method
llvm-svn: 36571
2007-04-29 19:17:32 +00:00
Chris Lattner
8308e85781 make this file self-contained
llvm-svn: 36555
2007-04-29 08:05:07 +00:00
Chris Lattner
eee1022086 Switch the bitcode reader interface to take a MemoryBuffer instead of knowing
anything about disk I/O itself.  This greatly simplifies its interface -
eliminating the need for the ReaderWrappers.cpp file.

This adds a new option to llvm-dis (-bitcode) which instructs it to read
the input file as bitcode.  Until/unless the bytecode reader is taught to
read from MemoryBuffer, there is no way to handle stdin reading without it.

I don't plan to switch the bytecode reader over, I'd rather delete it :),
so the option will stay around temporarily.

llvm-svn: 36554
2007-04-29 07:54:31 +00:00
Chris Lattner
e1248f05f2 start defining codes for instructions
llvm-svn: 36471
2007-04-26 05:53:04 +00:00
Chris Lattner
4721ac3ee0 add a new code
llvm-svn: 36462
2007-04-26 03:26:26 +00:00
Chris Lattner
4a0785ffcd add alias support to bitcode
llvm-svn: 36460
2007-04-26 02:46:23 +00:00
Chris Lattner
61f8d0e81c comentate
llvm-svn: 36395
2007-04-24 15:54:42 +00:00
Chris Lattner
5ae162a9d2 add records for constant exprs
llvm-svn: 36393
2007-04-24 07:03:08 +00:00
Chris Lattner
ea07262cc5 add codes for constants table
llvm-svn: 36382
2007-04-23 23:29:59 +00:00
Chris Lattner
8f45aa08fa Fix a bug in bitstream writer handling abbrevs, add value symtab
llvm-svn: 36373
2007-04-23 20:34:46 +00:00
Chris Lattner
193294e642 implement reading of abbrevs
llvm-svn: 36366
2007-04-23 18:57:58 +00:00
Chris Lattner
38568c7454 minor cleanups
llvm-svn: 36365
2007-04-23 18:57:32 +00:00
Chris Lattner
69a8eda44d finish implementation of basic abbrev writing.
llvm-svn: 36364
2007-04-23 17:43:52 +00:00
Chris Lattner
5510ac5a56 first part of implementation of abbrevs. The writer isn't fully there yet and the
reader doesn't handle them at all yet.

llvm-svn: 36363
2007-04-23 16:04:05 +00:00
Chris Lattner
1aa0ae26a8 promote this to being a public header.
llvm-svn: 36357
2007-04-23 01:01:15 +00:00
Reid Spencer
bcf9c262e7 Terminate with newline.
llvm-svn: 36345
2007-04-22 16:31:22 +00:00
Jeff Cohen
2cf2830f4d Teach Visual Studio about Bitcode.
llvm-svn: 36341
2007-04-22 15:00:52 +00:00
Chris Lattner
97852839f7 Define the content-independent interfaces to read/write bitcode files and
the high-level interface to read/write LLVM IR bitcode files.

This is a work in progress.

llvm-svn: 36329
2007-04-22 06:22:05 +00:00