[PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL 1.2/2.0 header files.

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 1 08:31:10 PDT 2016


yaxunl added a comment.

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.


http://reviews.llvm.org/D18369





More information about the cfe-commits mailing list