[PATCH] D89869: [OpenCL] Define OpenCL feature macros for all versions

Anton Zabaznov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 21 04:00:35 PDT 2020


azabaznov created this revision.
azabaznov added reviewers: Anastasia, svenvh.
Herald added subscribers: dexonsmith, jfb.
azabaznov requested review of this revision.

This change relates to OpenCL C 3.0 support. RFC thread: https://lists.llvm.org/pipermail/cfe-dev/2020-September/066883.html

The same interface  ('-cl-ext' option) is being used to indicate that feature or extension is supported. OpenCL C 3.0 by default doesn't provide any features which are core in OpenCL C 2.0.  The idea is to define feature test macros for all OpenCL versions and provide simultaneous macro presence if there exist equivalent extension.


https://reviews.llvm.org/D89869

Files:
  clang/include/clang/Basic/OpenCLExtensions.def
  clang/include/clang/Basic/OpenCLOptions.h
  clang/lib/Basic/Targets/SPIR.h
  clang/lib/Basic/Targets/X86.h
  clang/lib/Frontend/CompilerInstance.cpp
  clang/lib/Parse/ParsePragma.cpp
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTWriter.cpp
  clang/test/Preprocessor/opencl-feature-extension-simult.cl
  clang/test/Preprocessor/opencl-features.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89869.299629.patch
Type: text/x-patch
Size: 15480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201021/50d058a9/attachment-0001.bin>


More information about the cfe-commits mailing list