[PATCH] D107769: [OpenCL] Make generic addrspace optional for -fdeclare-opencl-builtins

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 28 08:43:44 PST 2022


Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.

LGTM. Thanks for changing this. I have no issues with this patch as it doesn't change the behavior for OpenCL 2.0 but I did create an issue for OpenCL-Docs to fix this problem somehow: https://github.com/KhronosGroup/OpenCL-Docs/issues/753. So in case, there is any feedback we can refine this behavior later on.



================
Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:73
 #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
+#define __opencl_c_generic_address_space 1
 #define cl_khr_subgroup_extended_types 1
----------------
btw this is not correct for C++ for OpenCL 2021 but we are not testing this with C++ for OpenCL 2021 which we should.

However it doesn't belong to this patch, but would you be able to add a FIXME here to indicate the issue?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107769/new/

https://reviews.llvm.org/D107769



More information about the cfe-commits mailing list