[LLVMdev] Re: New primitive type for 32/64 compatibility?
Mike Hearn
mike at navi.cx
Sat Apr 16 14:05:31 PDT 2005
On Sat, 16 Apr 2005 10:38:10 -0500, Chris Lattner wrote:
> While I don't think that having 'long_t' or something like that is
> necessarily a good idea, I do think that having an 'intptr' type could be
> a useful feature, with the advantage of it being a language-independent
> construct. I think this would capture what you're really going for, and
> have very simple and well-defined meaning.
Yes, maybe ... what exactly is the definition of this type? On LP64
systems the width of ints and pointers are different.
> If other front-end people
> think that this would be a useful abstraction for providing portable
> code, and can give examples where it would be used, that would provide a
> lot of credibility in my mind for the feature.
OK. I can't actually think of a use for it outside of C/C++ as I don't
think any other languages have types which are so loosely defined.
> The bigger problem I suspect is that you'll need to modify the LLVM C
> front-end, llvm-gcc, to produce these. I suspect that making it produce
> these will be fairly hard, as GCC's internal representation is
> notoriously for being not type-consistent. If you wanted to start on a
> project like this, that would be the place to get started.
Alright. I will keep this in mind. Thanks for getting me started.
thanks -mike
More information about the llvm-dev
mailing list