Anastasia added a comment.

In http://reviews.llvm.org/D18369#389469, @yaxunl wrote:

> One of the difference between opencl-12.cl and opencl-20.cl is opencl-12.cl 
> defines
>
>   #define const_func __attribute__((const))
>   #define readonly __attribute__((pure))
>   
>
> and uses them for many functions, e.g.
>
>   float const_func __attribute__((overloadable)) acos(float);
>   
>
> I think this is a nice feature for performance. However surprisingly 
> opencl-20.cl does not do that.
>
> I suggest to keep these attributes in the merged file. What do you think? 
> Thanks.


I think it's OK to have them them in. But if we keep this, could we use "__" 
prefix to avoid possible clashes with the custom code identifiers (the same 
should apply to any other identifiers which we declare in this header that is 
not specified in Spec).

> Do you agree that we should have one single opencl.h instead of headers for 
> different OpenCL versions?


The only concern about having one header would be its parsing speed due to 
large size. But I believe that the proportion of CL1.2 and CL2.0 declarations 
isn't really large. So perhaps we won't gain much from separating into multiple.

> >   What about OpenCL 1.1 header? Ideally it would be nice to have them in 
> > too!

> 




> We can add it later after we done with 1.2 and 2.0 headers.


Since CL1.2 and CL2.0 are derived from CL1.1, it would make sense to fix the 
declarations (header) for CL1.1 too.


http://reviews.llvm.org/D18369



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to