[LLVMdev] BC Fle Format Change: No More Alignment!

Reid Spencer reid at x10sys.com
Tue Aug 17 00:57:03 PDT 2004


LLVMers,

Due to a corner case provided by Robert Mykland, we've decided to do
away with alignment in bytecode files. The original reason for alignment
has gone away and all it does is add bytes to the file. In Robert's test
case, 34% (44KBytes) of the file was thrown needlessly to alignment.
While this is a corner case, it certainly can and does happen. Bytecode
files with lots of long format (5+ bytes) instructions will now consume
only the number of bytes they took. Previously they would be aligned to
8, 12 or even (gasp!) 16 bytes. 

These changes coincide with an increment in the bytecode version number
(now version 4) to minimize impact to developers. Your version 3 runtime
libraries should be fine.  I have run these changes through Feature,
Regression, Burg and McCat/08-main with both V3 and V4 bytecode file
versions for the runtime libs. All pass without incident.

I don't expect any issues with these changes, but please let me know if
there are any. Changes are here:

http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040816/017262.html
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040816/017263.html
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040816/017264.html

Thanks go to Robert for helping point out this waste of space.

Reid.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040817/78320eb7/attachment.sig>


More information about the llvm-dev mailing list