[PATCH] D120262: [OpenCL] Handle TypeExtensions in OpenCLBuiltinFileEmitter

Sven van Haastregt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 21 10:00:10 PST 2022


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

Until now, any types that had TypeExtensions attached to them were not
guarded with those extensions.  Extend the OpenCLBuiltinFileEmitter
such that all required extensions are emitted for the types of a
builtin function.

The `clang-tblgen -gen-clang-opencl-builtin-tests` emitter will now
produce e.g.:

  #if defined(cl_khr_fp16) && defined(cl_khr_fp64)
  half8 test11802_convert_half8_rtp(double8 arg1) {
    return convert_half8_rtp(arg1);
  }
  #endif // TypeExtension


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120262

Files:
  clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120262.410331.patch
Type: text/x-patch
Size: 3536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220221/2c6d02f0/attachment.bin>


More information about the cfe-commits mailing list