[cfe-dev] default address space of pointers is generic in CL2.0 mode

Song, Ruiling ruiling.song at intel.com
Fri Aug 7 01:11:55 PDT 2015



> -----Original Message-----
> From: Dr D. Chisnall [mailto:dc552 at hermes.cam.ac.uk] On Behalf Of David
> Chisnall
> Sent: Thursday, August 6, 2015 9:41 PM
> To: Song, Ruiling
> Cc: Anastasia Stulova <anastasia.stulova at arm.com>
> (anastasia.stulova at arm.com); cfe-dev at lists.llvm.org
> Subject: Re: [cfe-dev] default address space of pointers is generic in CL2.0 mode
> 
> On 6 Aug 2015, at 09:34, Song, Ruiling <ruiling.song at intel.com> wrote:
> >
> > Hi Anastasia,
> >
> > Are you working this? That is to change the default address space of pointers
> to generic. Or anybody working on that?
> 
> I’m not sure exactly what this entails for OpenCL, but I have patches that allow
> the default AS in clang to be non-zero (and to LLVM to support a stack in a non-0
> AS) that I could probably disentangle in about two weeks (or could point
> someone else at if they wanted to have a look now).

Opencl default variables to private address space, but for program scope variable or static variables default to global address space.
And "Pointers that are declared without pointing to named address space point to the generic address space."
Previous discussion points to the provisional SPIR 2.0 generator from Khronos. The function is already included in the patch:
https://github.com/KhronosGroup/SPIR/commit/881e8bb502d353570cc44f02d2729d118a1af58e
as I am not familiar with clang internal. I am still trying to figure out how it works.

Thanks!
Ruiling
> 
> David



More information about the cfe-dev mailing list