[PATCH] D92231: [OpenCL] Implement extended subgroups fully in headers

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 27 07:20:15 PST 2020


Anastasia created this revision.
Anastasia added reviewers: azabaznov, AlexeySotkin, mantognini, svenvh, PiotrFusik.
Herald added subscribers: ebevhan, yaxunl.
Anastasia requested review of this revision.

Extended subgroups extensions were added in https://reviews.llvm.org/D79781, however, in the unpublished spec there is no `pragma` mentioned anywhere and therefore adding it is incorrect. This should be fixed ideally before the spec is published to avoid a wide impact on the developers.

Considering that the extensions are implemented in headers and libraries there is no point to add it into the main Clang code. Therefore the macro definitions are now moved to the internal header. The macros should only be defined if the functionality is available. This makes the flow more consistent for developers as without the header the functions are not declared and therefore any kernel code calling them won't be compiled successfully.

More details about the effort on correcting the extension implementation can be found in: https://reviews.llvm.org/D91531


https://reviews.llvm.org/D92231

Files:
  clang/include/clang/Basic/OpenCLExtensions.def
  clang/lib/Headers/opencl-c-base.h
  clang/test/Headers/opencl-c-header.cl
  clang/test/SemaOpenCL/extension-version.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92231.308047.patch
Type: text/x-patch
Size: 7886 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201127/730e0e4a/attachment.bin>


More information about the cfe-commits mailing list