summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
Commit message (Collapse)AuthorAgeFilesLines
...
* add abbrevs for the constants tables. This shrinks it from 4.49755e6 bitsChris Lattner2007-05-051-61/+123
| | | | | | to 3.85972e6 bits in kc++ llvm-svn: 36778
* Add abbreviations to the TYPE_BLOCK for pointers, functions, structs and arrays.Chris Lattner2007-05-051-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 36776
* add a char6 abbrev for bbnames and value names. This represents each characterChris Lattner2007-05-051-12/+30
| | | | | | | | | | | | | | | | | | | | | with 6 bits where possible. This shrinks kc++ from 3324164B to 3183584B. The old VST was: Block ID #14 (VALUE_SYMTAB): Total Size: 1.26713e+07b/1.58391e+06B/395978W Average Size: 5403.53b/675.442B/168.86W % of file: 47.6484 The new one is: Block ID #14 (VALUE_SYMTAB): Total Size: 1.15467e+07b/1.44334e+06B/360834W Average Size: 4923.96b/615.495B/153.874W % of file: 45.3368 This is 11% smaller than the VST in the bytecode format. llvm-svn: 36771
* add an abbreviation for the type symtab, this shrinks the TST from 175197 bitsChris Lattner2007-05-051-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | to 103165 bits: Old: Block ID #13 (TYPE_SYMTAB): Num Instances: 1 Total Size: 175197b/21899.6B/5474.91W Average Size: 175197b/21899.6B/5474.91W % of file: 0.657023 Tot/Avg SubBlocks: 0/0 Tot/Avg Abbrevs: 0/0 Tot/Avg Records: 255/255 % Abbrev Recs: 0 New: Block ID #13 (TYPE_SYMTAB): Num Instances: 1 Total Size: 103165b/12895.6B/3223.91W Average Size: 103165b/12895.6B/3223.91W % of file: 0.387937 Tot/Avg SubBlocks: 0/0 Tot/Avg Abbrevs: 1/1 Tot/Avg Records: 255/255 % Abbrev Recs: 100 llvm-svn: 36769
* Implement support for globally associating abbrevs with block IDs, whichChris Lattner2007-05-052-52/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* allow the 8-bit abbrev to be used for either bb or other valuesChris Lattner2007-05-041-6/+6
| | | | llvm-svn: 36761
* shave another 150K off of kc++, by using a 7-bit encoding for BB namesChris Lattner2007-05-041-1/+12
| | | | | | | | | | | | | | | | | | where we can. This shrinks kc++'s down to 3368K, with a VST record of: 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 Isn't it nice to be able to optimizer bc size without touching the reader? :) llvm-svn: 36759
* where possible, encode symtab names with 7 bits per char instead of 8. ThisChris Lattner2007-05-041-11/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | shaves 110K off kc++ to 3514K. Before: Block ID #14 (VALUE_SYMTAB): Num Instances: 2345 Total Size: 1.50425e+07b/1.88031e+06B/470077W Average Size: 6414.69b/801.837B/200.459W % of file: 51.8057 Tot/Avg SubBlocks: 0/0 Tot/Avg Abbrevs: 2345/1 Tot/Avg Records: 120924/51.5667 % Abbrev Recs: 85.1791 after: Block ID #14 (VALUE_SYMTAB): Num Instances: 2345 Total Size: 1.41229e+07b/1.76536e+06B/441341W Average Size: 6022.56b/752.82B/188.205W % of file: 50.2295 Tot/Avg SubBlocks: 0/0 Tot/Avg Abbrevs: 4690/2 Tot/Avg Records: 120924/51.5667 % Abbrev Recs: 85.1791 llvm-svn: 36758
* Encode all value symtab strings as arrays of 8-bit fixed width integers,Chris Lattner2007-05-041-15/+15
| | | | | | | instead of the default inefficient encoding. This shrinks kc++ from 4134K to 3629K llvm-svn: 36755
* eliminate internal length fields from record. Records already know theirChris Lattner2007-05-042-48/+48
| | | | | | total length llvm-svn: 36752
* stub out creation of BLOCKINFO_BLOCKChris Lattner2007-05-041-0/+25
| | | | llvm-svn: 36749
* optimize constant layout. This fixes encoding of 181.mcf (by ensuringChris Lattner2007-05-042-5/+48
| | | | | | | integer structure idx's are emitted before constant expr geps) and shrinks files slightly. For example kc++ shrinks from 4326188 to 4240128 bytes. llvm-svn: 36742
* simple optimization for the type tableChris Lattner2007-05-041-5/+29
| | | | llvm-svn: 36741
* storeinst ctor takes isvolatile before alignment. With this, 176.gcc roundtripsChris Lattner2007-05-041-1/+1
| | | | llvm-svn: 36738
* fix encoding of invoke instructions. kc++ now round tripsChris Lattner2007-05-041-1/+0
| | | | llvm-svn: 36737
* fix a misplaced errorChris Lattner2007-05-041-1/+1
| | | | llvm-svn: 36736
* encode and read param attrs along with function type. WE can now roundtrip ↵Chris Lattner2007-05-042-9/+8
| | | | | | Olden/voronoi loslessly llvm-svn: 36735
* add support for reading the param attrs blockChris Lattner2007-05-042-0/+82
| | | | llvm-svn: 36731
* fix a bug encoding param attrsChris Lattner2007-05-041-1/+1
| | | | llvm-svn: 36730
* remove dead codeChris Lattner2007-05-041-6/+0
| | | | llvm-svn: 36728
* add writer support for param attrsChris Lattner2007-05-041-1/+15
| | | | llvm-svn: 36724
* Allow this to compile with gcc 4.0.XReid Spencer2007-05-041-2/+4
| | | | llvm-svn: 36723
* pass by reference, not by valueChris Lattner2007-05-041-1/+1
| | | | llvm-svn: 36721
* trivial scaffolding for param attrsChris Lattner2007-05-041-0/+12
| | | | llvm-svn: 36720
* enumerate parameter attr lists.Chris Lattner2007-05-032-0/+33
| | | | llvm-svn: 36709
* Encoding calling conv info in call/invoke instrs, tree add now round trips ↵Chris Lattner2007-05-032-18/+24
| | | | | | completely llvm-svn: 36707
* the type field for a store is the type of the pointer, not the value.Chris Lattner2007-05-031-3/+4
| | | | | | With this fix I can round trip treeaadd, only losing calling conv info. llvm-svn: 36706
* don't bother encoding # varargsChris Lattner2007-05-031-1/+0
| | | | llvm-svn: 36705
* fix encoding of BB names in the symtabChris Lattner2007-05-033-5/+21
| | | | llvm-svn: 36704
* bug fixesChris Lattner2007-05-031-3/+3
| | | | llvm-svn: 36701
* implement the rest of the instructionsChris Lattner2007-05-031-10/+68
| | | | llvm-svn: 36699
* add a few more instructions, getting closeChris Lattner2007-05-031-10/+53
| | | | llvm-svn: 36688
* add reader logic for terminator instrs.Chris Lattner2007-05-023-10/+93
| | | | llvm-svn: 36642
* add reader support for a bunch of new instructionsChris Lattner2007-05-021-14/+90
| | | | llvm-svn: 36641
* read a few instructions, fix some bugs. This is enough to be able to roundChris Lattner2007-05-021-15/+38
| | | | | | | | | | | | | | trip function bodies like this: define <2 x i64> @foo(<2 x i64> %x, <2 x i64> %y) { %tmp4 = bitcast <2 x i64> %y to <8 x i16> ; <<8 x i16>> [#uses=1] %tmp5 = bitcast <2 x i64> %x to <8 x i16> ; <<8 x i16>> [#uses=1] %tmp = add <8 x i16> %tmp5, %tmp4 ; <<8 x i16>> [#uses=1] %tmp6 = bitcast <8 x i16> %tmp to <2 x i64> ; <<2 x i64>> [#uses=1] ret <2 x i64> %tmp6 } llvm-svn: 36640
* use the correct code for binop instrsChris Lattner2007-05-021-1/+1
| | | | llvm-svn: 36639
* fix build with non-buggy compilersChris Lattner2007-05-011-10/+11
| | | | llvm-svn: 36621
* handle function-level forward references, read binops.Chris Lattner2007-05-012-20/+145
| | | | llvm-svn: 36620
* implement materializeModule, force deallocation of vector memory when weChris Lattner2007-05-012-15/+107
| | | | | | are done with them, start implementing ParseFunctionBody llvm-svn: 36617
* The stream to read from is now an ivarChris Lattner2007-05-012-20/+18
| | | | llvm-svn: 36615
* implement scafolding for lazy deserialization of function bodiesChris Lattner2007-05-012-7/+85
| | | | llvm-svn: 36614
* write the symbol table for function bodiesChris Lattner2007-05-011-30/+33
| | | | llvm-svn: 36610
* encode all of the instructions.Chris Lattner2007-05-011-3/+166
| | | | llvm-svn: 36609
* Implement visibility checking during linking. Also implement protectedAnton Korobeynikov2007-04-292-2/+4
| | | | | | visibility support for bitcode. llvm-svn: 36577
* Switch the bitcode reader interface to take a MemoryBuffer instead of knowingChris Lattner2007-04-293-108/+62
| | | | | | | | | | | | | | 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
* Fix this to use the right block IDChris Lattner2007-04-291-3/+1
| | | | llvm-svn: 36550
* moved Writer.cpp -> BitcodeWriter.cpp to make it more unique in the tree.Chris Lattner2007-04-291-1/+1
| | | | llvm-svn: 36549
* This is not "FIXME" anymoreAnton Korobeynikov2007-04-281-3/+1
| | | | llvm-svn: 36541
* start code for writing out instructions. Separate BB#s from normal valueChris Lattner2007-04-263-5/+83
| | | | | | #'s. llvm-svn: 36472
* enumerate BB's separately from other function values.Chris Lattner2007-04-262-4/+16
| | | | llvm-svn: 36467
OpenPOWER on IntegriCloud