[OpenCL] CL2.0 restricts coversions of pointers to different address spaces
Anastasia Stulova
anastasia.stulova at arm.com
Mon Nov 17 10:26:39 PST 2014
An update is attached here!
Thanks,
Anastasia
-----Original Message-----
From: Pekka Jääskeläinen [mailto:pekka.jaaskelainen at tut.fi]
Sent: 12 November 2014 09:11
To: Anastasia Stulova; cfe-commits at cs.uiuc.edu
Subject: Re: [OpenCL] CL2.0 restricts coversions of pointers to different
address spaces
Hi,
Could the two bool isAddressSpaceOverlapping() methods share code somehow?
Otherwise LGTM (but I'm still learning the Clang code base!).
On 11/11/2014 08:13 PM, Anastasia Stulova wrote:
> Hello,
>
> In this patch I added restrictions for conversions of pointers to
> different address spaces as explained below.
>
> OpenCLv2.0 C spec s6.5 adds __generic (unnamed) address space to be
> used as a place holder in case an address space is not known
> statically or multiple are intended to be used with the same fragment of
code.
>
> All named address spaces (that existed in the previous OpenCL
> standards) except for __constant are subset of __generic one.
> Conversions between pointers of different address spaces are regulated by
rules in s6.5.5 as follows:
>
> -The named address spaces ( __global, __local, and __private) can be
> converted to __generic implicitly. Generic -> named can only be done
> with an explicit cast.
>
> -Conversions between pointers of named address spaces are not allowed.
>
> -A pointer to the __constant address space can only be converted to a
> pointer to the __constant address space (either by an implicit cast
> or by an explicit one).
>
> This patch depends on the change submitted previously:
>
> https://www.mail-archive.com/cfe-commits@cs.uiuc.edu/msg109232.html
>
> Thanks,
>
> Anastasia
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
--
Pekka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: address_space_coversions_v1.patch
Type: application/octet-stream
Size: 20235 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141117/bdfda011/attachment.obj>
More information about the cfe-commits
mailing list