[PATCH] D107154: [OpenCL] Add support of __opencl_c_pipes feature macro.

Anton Zabaznov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 30 05:31:51 PDT 2021


azabaznov created this revision.
azabaznov added reviewers: Anastasia, svenvh.
Herald added subscribers: ldrumm, dexonsmith, yaxunl.
azabaznov requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

'pipe' keyword is introduced in OpenCL C 2.0: so do checks for OpenCL C version while
parsing and then later on check for language options to construct actual pipe. This feature
requires support of __opencl_c_generic_address_space, so diagnostics for that is provided as well.

This is the same patch as in D106748 <https://reviews.llvm.org/D106748> but with a tiny fix in checking of diagnostic messages.
Also added tests when program scope global variables are not supported.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107154

Files:
  clang/include/clang/Basic/LangOptions.def
  clang/lib/Basic/OpenCLOptions.cpp
  clang/lib/Basic/TargetInfo.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/lib/Parse/ParseDecl.cpp
  clang/lib/Sema/Sema.cpp
  clang/test/CodeGenOpenCL/address-spaces-mangling.cl
  clang/test/CodeGenOpenCL/address-spaces.cl
  clang/test/CodeGenOpenCL/pipe_builtin.cl
  clang/test/CodeGenOpenCL/pipe_types.cl
  clang/test/CodeGenOpenCL/pipe_types_mangling.cl
  clang/test/Misc/opencl-c-3.0.incorrect_options.cl
  clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl
  clang/test/SemaOpenCL/invalid-pipes-cl2.0.cl
  clang/test/SemaOpenCL/storageclass.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107154.363043.patch
Type: text/x-patch
Size: 18166 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210730/d96a16e0/attachment-0001.bin>


More information about the cfe-commits mailing list