[all-commits] [llvm/llvm-project] e994e7: [OpenCL] Add clang extension for non-portable kern...

Anastasia Stulova via All-commits all-commits at lists.llvm.org
Wed May 5 06:59:10 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e994e74bca49831eb649e7c67955e9de7a1784b6
      https://github.com/llvm/llvm-project/commit/e994e74bca49831eb649e7c67955e9de7a1784b6
  Author: Anastasia Stulova <anastasia.stulova at arm.com>
  Date:   2021-05-05 (Wed, 05 May 2021)

  Changed paths:
    M clang/docs/LanguageExtensions.rst
    M clang/include/clang/Basic/OpenCLExtensions.def
    M clang/lib/Basic/Targets/AMDGPU.h
    M clang/lib/Basic/Targets/NVPTX.h
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/Misc/amdgcn.languageOptsOpenCL.cl
    M clang/test/Misc/nvptx.languageOptsOpenCL.cl
    M clang/test/Misc/r600.languageOptsOpenCL.cl
    M clang/test/SemaOpenCLCXX/invalid-kernel.clcpp

  Log Message:
  -----------
  [OpenCL] Add clang extension for non-portable kernel parameters.

Added __cl_clang_non_portable_kernel_param_types extension that
allows using non-portable types as kernel parameters. This allows
bypassing the portability guarantees from the restrictions specified
in C++ for OpenCL v1.0 s2.4.

Currently this only disables the restrictions related to the data
layout. The programmer should ensure the compiler generates the same
layout for host and device or otherwise the argument should only be
accessed on the device side. This extension could be extended to other
case (e.g. permitting size_t) if desired in the future.

Patch by olestrohm (Ole Strohm)!

https://reviews.llvm.org/D101168




More information about the All-commits mailing list