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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10915 91177308-0d34-0410-b5e6-96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10864 91177308-0d34-0410-b5e6-96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10280 91177308-0d34-0410-b5e6-96231b3b80d8
- Null values are implicitly encoded instead of explicitly, this makes
things more compact!
- More compactly represent ConstantPointerRefs
- Bytecode files are represented as:
Header|GlobalTypes|GlobalVars/Function Protos|Constants|Functions|SymTab
instead of
Header|GlobalTypes|Constants|GlobalVars/Function Protos|Functions|SymTab
which makes a lot of things simpler.
Writer changes:
- We now explictly encode versioning information in the bytecode files.
- This allows new code to read bytecode files produced by old code, but
new bytecode files can have enhancements such as the above. Although this
makes the reader a bit more complex (having to deal with old formats), the
writer only needs to be able to produce the most recent version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5749 91177308-0d34-0410-b5e6-96231b3b80d8
because the slot calculator is already part of the VMCore library.
* Rename incorporateMethod and purgeMethod to *Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2154 91177308-0d34-0410-b5e6-96231b3b80d8
* Internal rep no longer has a constant pool
* Support emission of recursive types
* Don't output a constant pool for an external method
* The bytecode writer is no longer a module analyzer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@449 91177308-0d34-0410-b5e6-96231b3b80d8