[LLVMdev] More Encoding Ideas

Reid Spencer reid at x10sys.com
Fri Aug 20 19:07:01 PDT 2004


On Fri, 2004-08-20 at 19:10, Chris Lattner wrote:
> On Fri, 20 Aug 2004, Reid Spencer wrote:
> >
> > The only thing it would change is that character constants with values >
> > 63 would get encoded in 1 byte instead of 2 (with current
> > implementation). I'm making a change that will ALWAYS encode UByteTyID
> > and SByteTyID constants in 1 byte which would then render
> > -funsigned-char useless (as far as bytecode goes).
> 
> It's 127 right, not 63?  Also, what does this have to do with sbyte vs
> ubyte?

No, its 63. Signed bit takes up one bit and "continue bit" takes up
another so signed values 0-63 get the first byte and 64-127 get the
second, etc.

This has to do with sbyte and ubyte because "char" type gets translated
to them.

> >
> > By "random cruft" you're referring to the current lib/Debugger things
> > intermixed with the instructions?
> 
> Hrm, actually, random cruft still might be useful in the future.  In
> particular, for large scale IPA (millions of LOC programs), you want to be
> able to do analysis at compile time, then read just the analysis results
> in at link time instead of holding the whole program in memory.  Being
> able to define additional section ID's later could be useful.

Removing the Module ID field doesn't affect that. As Robert pointed out,
if we're not done reading the file by the time the "size" field runs out
then there's more in the file, either more modules or "random cruft" :)

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/20040820/64f11190/attachment.sig>


More information about the llvm-dev mailing list