[patch] builtins.c, fold-const.c: Don't create type

Chris Lattner sabre@nondot.org
Mon Apr 18 00:26:00 GMT 2005


On Sat, 16 Apr 2005, Paul Schlie wrote:
>> On IRC, Chris Lattner mentioned (if I understood him correctly) that in
>> LLVM this kind of pointer arithmetic doesn't exist, and that instead it
>> is converted to "regular" integer arithmatic by casting the pointer to
>> intptr_t (instead of casting the integer to a pointer).  Would that be
>> a better solution for GCC too, perhaps?
>
> Unfortunately, as the LLVM does not seem to differentiate between pointers
> to data (ram-heap-stack/rom-literal-data) vs. code (labels/functions); it's
> only capable of representing the simplest Von Newman machines; which is a
> fine for a simulated "virtual machine" target, but not likely a worthy basis
> for a "target-able" compiler model; as more specifically partitioned
> machines require correspondingly specific types of objects specified by the
> program to be retained to optimally map the program to their architectures.

I'm sorry, but this claim is simply not true.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/



More information about the Gcc-patches mailing list