[PATCH] D27627: Allow target to specify default address space for codegen

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 9 14:01:19 PST 2016


rjmccall added a comment.

Ok, I'm not understanding this, then.

I declare a local variable:

  int x;

According to you, x should be in the generic address space, i.e. the private address space.  And at the LLVM IR level, this will be implemented with an AllocaInst, which always creates memory in the private address space, i.e. LLVM address space 0.

But Sema believes that the l-value 'x' has type int, without an address space, and therefore that '&x' has type int*, again without an explicit address space.  And you want to say that that type actually points into a different address space, and to make sure that that pointer is in LLVM address space 4.

Something about this does not work.


https://reviews.llvm.org/D27627





More information about the cfe-commits mailing list