[LLVMdev] Moving towards a singular pointer type

David Chisnall David.Chisnall at cl.cam.ac.uk
Mon Feb 9 05:34:35 PST 2015


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

[1] Not sure when slides and videos will appear for this, but hopefully soon: https://fosdem.org/2015/schedule/event/llvmmagicland/



More information about the llvm-dev mailing list