[LLVMdev] More Encoding Ideas

Reid Spencer reid at x10sys.com
Fri Aug 20 18:48:02 PDT 2004


On Fri, 2004-08-20 at 18:43, Chris Lattner wrote:

> I don't understand what you're getting at here.  You can change char to
> default to unsigned right now with llvm-gcc -funsigned-char.  I don't
> understand how that would change anything to be more useful though.

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).

> Okay, that's fine.  When implementing that, we should take care to create
> the pointer types lazily instead of eagerly to avoid creating pointer
> types that are not used.

Eww .. you just raised a really good point. I was planning on doubling
the referent type's slot number to get the pointer type. But, if all the
pointer types are not used in the program then this just serves to
increase the numerical values of the slot numbers and it will actually
bloat the size of the file because the vbr_uint written slot numbers
could take more bytes to write. 

Contrary to previous assertions, I'm not going to implement this unless
we can prove that its beneficial.


> I think that debug libraries should be handled in other ways.  The
> original idea was to have .bc files hold lots of other random cruft with
> them.  With more experience, this seems like a bad idea.

By "random cruft" you're referring to the current lib/Debugger things
intermixed with the instructions?

-------------- 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/9ebf3f71/attachment.sig>


More information about the llvm-dev mailing list