[LLVMdev] Moving towards a singular pointer type

Philip Reames listmail at philipreames.com
Tue Feb 10 15:08:30 PST 2015


On 02/09/2015 05:34 AM, David Chisnall wrote:
> On 8 Feb 2015, at 16:53, David Blaikie <dblaikie at gmail.com> wrote:
>> I imagine/assume that distinct pointer types per address space are still necessary, but I haven't looked at address spaces in any particular detail.
> We probably have the weirdest pointer requirements (an out-of-tree target with pointers that are not integers[1]).  I don't believe that this would cause problems for us, as long as we can differentiate pointers in different address spaces.
>
> Being able to strip out all of the casts to and from i8* that various bits of clang insert because certain intrinsics take an i8* and so pointers must be cast and cast back would simplify things a lot for us (in particular, clang often picks an i8* in the wrong AS - it wouldn't if there were no bitcast at all).
>
> I wonder what the effects would be on TBAA?  Would pointers still have some metadata associated with them to indicate what their types were, or would this just be attached to the corresponding load / store instructions?
>
> David
As with David, I know of no issues moving to a singular pointer type per 
address space.  Having the type on the load or store instruction is 
perfectly adequate for GC barrier and safepoint insertion purposes.

Philip



More information about the llvm-dev mailing list