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

91 Commits

Author SHA1 Message Date
Reid Spencer
d841d33637 Adjust to Compressor interface change
llvm-svn: 18249
2004-11-25 19:38:05 +00:00
Chris Lattner
10b5a5c0da Do not emit FunctionBlock blocks for external functions. This shrinks
bytecode files by about 8 bytes per external function

llvm-svn: 17859
2004-11-15 22:39:49 +00:00
Chris Lattner
c199d448e9 Disable this change, it was premature
llvm-svn: 17857
2004-11-15 21:56:33 +00:00
Chris Lattner
571b490404 If a function is external, do not output a FunctionBlock for the function
AT ALL.  This saves 11 bytes per external function from the bytecode file,
and is also required to make GhostLinkage work.

llvm-svn: 17854
2004-11-15 21:46:40 +00:00
Reid Spencer
5c112bc910 Simplify compression code by using the high level interface to the Compressor
llvm-svn: 17771
2004-11-14 22:01:41 +00:00
Reid Spencer
1446cd065f * Add comments and cleanup per CL code review
* Make signature for compressed bytecode llvc instead of unreadable
* Make the CompressionContext have a constructor and destructor.

llvm-svn: 17576
2004-11-07 18:17:38 +00:00
Reid Spencer
a81994464f Add support for compressed bytecode
llvm-svn: 17535
2004-11-06 23:17:23 +00:00
Chris Lattner
8336590b1f Add support for undef, unreachable, and function flags
llvm-svn: 17054
2004-10-16 18:18:16 +00:00
Chris Lattner
ad57c9f54c Today is not my day. Fix broken #
llvm-svn: 16967
2004-10-14 02:31:35 +00:00
Chris Lattner
d2a5066c6a unbreak previous checkin :(
llvm-svn: 16966
2004-10-14 02:06:48 +00:00
Chris Lattner
93bfff6da2 Add back a missing paren
llvm-svn: 16965
2004-10-14 01:57:28 +00:00
Chris Lattner
2ed4986e00 Wrap to 80 cols, delete some seriously old debugging printouts
llvm-svn: 16963
2004-10-14 01:46:07 +00:00
Chris Lattner
bdb8db1a40 Minor cleanups
llvm-svn: 16961
2004-10-14 01:35:17 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer
54503bf00a Prevent an empty compaction table from being written to the bytecode file.
llvm-svn: 16063
2004-08-27 00:38:44 +00:00
Brian Gaeke
01636f4e0f Packed types, brought to you by Brad Jones
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
Reid Spencer
90f77c960f Bytecode File Format Changes:
- File format version number bumped to 4
- Writer will now align nothing
- Reader now only expects alignment for version 3 or earlier

llvm-svn: 15875
2004-08-17 07:45:14 +00:00
Reid Spencer
f0067ed08d Correct the comments in the symbol table writer to reflect reality.
llvm-svn: 15848
2004-08-17 02:59:02 +00:00
Alkis Evlogimenos
f853362a44 Stop using getValues().
llvm-svn: 15487
2004-08-04 08:44:43 +00:00
Reid Spencer
1bf4f4f9e1 Adjust to new Module.h interface for dependent libraries.
llvm-svn: 15218
2004-07-25 21:32:02 +00:00
Reid Spencer
3043e82af5 bug 263:
- encode/decode target triple and dependent libraries
bug 401:
- fix encoding/decoding of FP values to be little-endian only
bug 402:
- initial (compatible) cut at 24-bit types instead of 32-bit
- reduce size of block headers by 50%
Other:
- cleanup Writer by consolidating to one compilation unit, rem. other files
- use a std::vector instead of std::deque so the buffer can be allocated
  in multiples of 64KByte chunks rather than in multiples of some smaller
  (default) number.

llvm-svn: 15210
2004-07-25 18:07:36 +00:00
Reid Spencer
f460e10236 bug 122:
- Correct ordering of tests because for GlobalValue isa Constant

llvm-svn: 14941
2004-07-18 00:16:21 +00:00
Reid Spencer
3c5a47177e Remove Tabs.
llvm-svn: 14611
2004-07-04 11:46:15 +00:00
Reid Spencer
bd058052d9 Implement new output functions for types and compacted type planes. Also
remove use of Type::TypeTyID and Type::TypeTy since Type no longer inherits
Value.

llvm-svn: 14610
2004-07-04 11:45:47 +00:00
Chris Lattner
2c7b54fea3 No functionality changes here:
* Some warning fixes for MSVC
  * Minor simplification to the deque scanning code

llvm-svn: 14417
2004-06-25 20:52:10 +00:00
Chris Lattner
33ebfe4339 Fix more warnings building with VC++
llvm-svn: 14391
2004-06-25 00:35:55 +00:00
Reid Spencer
b2939fc651 Use the SymbolTable::isEmpty() method instead of checking for no value
planes. A SymbolTable could still have types in it! This fixes problems
with two regression tests that failed because a symbol table that only
contained types was being omitted from bytecode files. Thanks to Chris
for the reduced test case that helped find this immediately.

llvm-svn: 13842
2004-05-27 20:18:51 +00:00
Reid Spencer
dccf1747a1 Part of bug 122:
This change removes the BuildBytecodeInfo flag from the SlotCalculator
class. This flag was needed to distinguish between the Bytecode/Writer
and the AsmWriter. Now that AsmWriter doesn't use SlotCalculator, we can
remove this flag and simplify some code. Also, some minor name changes
to CachedWriter.h needed to be committed (missed in previous commit).

llvm-svn: 13785
2004-05-26 07:37:11 +00:00
Reid Spencer
0e78929263 Changed to use SymbolTable's new iteration interfaces.
llvm-svn: 13759
2004-05-25 17:29:59 +00:00
Chris Lattner
ada730740b Implement support for a new LLVM 1.3 bytecode format, which uses uint's
to index into structure types and allows arbitrary 32- and 64-bit integer
types to index into sequential types.

llvm-svn: 12651
2004-04-05 01:27:26 +00:00
Chris Lattner
3818f475de Remove all of the annoying statistics now that I'm finished (for the near
term) working on bytecode size stuff.

llvm-svn: 11046
2004-02-01 01:50:31 +00:00
Chris Lattner
85a8d1cc2b Bugfixes for dealing with partially compactified functions
llvm-svn: 10920
2004-01-20 00:54:06 +00:00
Chris Lattner
28e1981c25 Save another 30K from 176.gcc by encoding the compaction table a bit more
intelligently.

llvm-svn: 10918
2004-01-18 22:35:34 +00:00
Chris Lattner
e29a22a76a Remove -debug output
llvm-svn: 10917
2004-01-18 22:26:53 +00:00
Chris Lattner
2258355dda Add support for writing bytecode files with compactiontables for bytecode files.
This shrinks the bytecode file for 176.gcc by about 200K (10%), and 254.gap by
about 167K, a 25% reduction.  There is still a lot of room for improvement in
the encoding of the compaction table.

llvm-svn: 10915
2004-01-18 21:08:52 +00:00
Chris Lattner
630c3ddea0 Bytecode format for LLVM 1.2 no longer explicitly encodes zeros in primitive
type planes.  This saves about 5k on 176.gcc, and is needed for a subsequent
patch of mine I'm working on.

llvm-svn: 10908
2004-01-17 23:25:43 +00:00
Chris Lattner
cce1db873e If these blocks are empty, there is no reason to even emit the bytecode blocks.
This saves about 15K in 176.gcc, coupled with another patch that I'm working on.

llvm-svn: 10889
2004-01-15 21:06:57 +00:00
Chris Lattner
04fe1058c2 Fix PR73: bytecode format inconsistent
llvm-svn: 10876
2004-01-15 17:55:09 +00:00
Chris Lattner
106bba1e9b The new bytecode format supports emitting strings a special case. This is
intended to save size (and does on small programs), but on big programs it
actually increases the size of the program slightly.  The deal is that many
functions end up using the characters that the string contained, and the
characters are no longer in the global constant table, so they have to be
emitted in function specific constant pools.

This pessimization will be fixed in subsequent patches.

llvm-svn: 10864
2004-01-14 23:36:54 +00:00
Chris Lattner
9e65e9b460 Ok, I can't handle it. This is a temporary checkin of a ton of statistics that
i'm using in my work to reduce the bytecode file sizes.  These will eventually
be removed.

llvm-svn: 10849
2004-01-14 16:54:21 +00:00
Chris Lattner
7cba50960d Toggle sense of flag
llvm-svn: 10838
2004-01-14 02:50:16 +00:00
Chris Lattner
accd21042c Do not bother to emit a BytecodeBlock for an empty symbol table. This commonly
occurs when the symbol table for a module has been stripped, making all of the
function local symbols go away.

This saves 6728 bytes in the stripped bytecode file of 254.gap (which obviously
has 841 functions), which isn't a ton, but helps and was easy.

llvm-svn: 10750
2004-01-10 19:56:59 +00:00
Chris Lattner
7318f16390 Err, we don't need Config/*.h files for things that are standard C++
llvm-svn: 10742
2004-01-10 19:10:01 +00:00
Chris Lattner
e069cb1c80 minor comment tweaks
llvm-svn: 10741
2004-01-10 19:07:06 +00:00
Chris Lattner
231965667f Finegrainify namespacification
llvm-svn: 10737
2004-01-10 18:49:43 +00:00
Chris Lattner
a2ac517a20 Emit & read more compressed bytecode by not emitting a bytecodeblock for
each basic block in function.  Instead, just emit a stream of instructions,
chopping up basic blocks based on when we find terminator instructions.  This
saves a fairly substantial chunk of bytecode space.  In stripped, sample
cases, for example, we get this reduction in size:

197.parser: 163036 -> 137180:  18.8% reduction
254.gap   : 844936 -> 689392:  22.6%
255.vortex: 621724 -> 528444:  17.7%

...

Not bad for something this simple.  :)  Note that this doesn't require a new
bytecode version number at all, though version 1.1 should not need to support
the old format.

llvm-svn: 10280
2003-12-01 07:05:31 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
b402729b30 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
3ff64cf568 add support for new linkage types
llvm-svn: 9228
2003-10-18 06:30:21 +00:00
Chris Lattner
e4fc9caea1 Updated to emit the final 1.0 bytecode format. This supports weak linkage,
more efficient encoding of varargs calls, and the new varargs intrinsics.

llvm-svn: 9221
2003-10-18 05:54:48 +00:00