[PATCH] [OpenCL] Promoting OpenCL image types

Tanya Lattner lattner at apple.com
Tue Feb 19 17:32:57 PST 2013


On Feb 15, 2013, at 7:11 AM, Joey Gouly <joey.gouly at arm.com> wrote:

> Hi All,
> 
> Currently the image access qualifiers (read_only, write_only and read_write)
> are ignored for the OpenCL image types.
> 
> We implemented a solution by adding these access qualifiers to the
> Qualifiers class that QualType uses.
> However this was found to be quite a fragile approach, as there are quite a
> few places inside where the
> unqualified type is used and the access qualifiers are lost. Several
> functions, such as: ASTContext::getCanonicalParamType,
> and ASTContext::getAdjustedParameterType, had to be changed to keep the
> qualifiers for OpenCL image types.

I do not understand. Those functions are designed to strip off qualifiers, so that makes sense. Can you give an example of why using Qualifiers does not work?

-Tanya

> 
> Therefore, my proposal is to promote the OpenCL image types from builtin
> types, to their own type. This will allow us
> to store the modifiers in the type directly.
> 
> The first patch implements this, and the second patch implements basic
> support for the qualifiers.
> 
> Please review and comment!
> 
> Thanks,
> Joey
> <image_types_p2.diff><image_types_p1.diff>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list