Khronos Members Hope To Begin Landing OpenCL C++ Support In LLVM's Clang Compiler
Written by Michael Larabel in LLVM on 27 March 2018 at 12:29 AM EDT. 5 Comments
While upstream Clang has support for OpenCL C 2.0, it doesn't currently have mainline support for OpenCL C++ but fortunately that soon should change.

Khronos Group members plan to soon begin work on contributing their OpenCL C++ changes to the upstream LLVM Clang compiler. This would allow mainline Clang -- presumably in time for Clang 7.0 -- to support OpenCL C++ on the front-end. They plan to begin this effort of getting the code cleaned up and reviewed beginning in April, with no LLVM developers having raised any objections yet to adding OpenCL C++ to this open-source C/C++ compiler front-end.

This would take Clang's OpenCL support up to the latest version 2.2 specification. OpenCL 2.2 is the version released last May that introduced the OpenCL C++ kernel language as a subset of C++14.

Proposed details can be found on the Clang mailing list.

Clang's OpenCL support could become quite compelling if/when the long talked about SPIR-V back-end for LLVM finally materializes in mainline LLVM. It looks like it eventually will and was still re-enforced when asking Khronos about it recently. With this latest work it would allow LLVM/Clang to go from OpenCL C/C++ to SPIR-V on a fully open and mainline compiler stack. But for now this code is housed off in various branches and not too developer/user friendly for quick and easy deployment.
Related News
About The Author
Author picture

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter or contacted via

Popular News This Week