[LLVMdev] [cfe-dev] RFC: Representation of OpenCL Memory Spaces

Peter Collingbourne peter at pcc.me.uk
Fri Oct 14 12:03:17 PDT 2011


On Fri, Oct 14, 2011 at 06:32:37PM +0000, Villmow, Micah wrote:
> > What kind of special handling would be required?  And how can you
> > always tell whether or not an access through address space 0 would be a
> > stack access?  For example, consider the attached .ll file, which
> > compiles to a global store here.
> [Villmow, Micah] If this was generated from OpenCL, then it is an invalid program as the default address space is private to the thread and you cannot have global variables in the private address space.

Indeed, but it is (at present) a valid LLVM IR for PTX.  The .ll file
illustrates the issue with having address space 0 map to the global
state space, as it does in the current PTX backend.

Thanks,
-- 
Peter



More information about the llvm-dev mailing list