[all-commits] [llvm/llvm-project] a779a1: [OpenCL] Remove unused extensions
Marco Antognini via All-commits
all-commits at lists.llvm.org
Thu Oct 22 09:01:53 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: a779a169931c0738bf43dc50fc545c1e88597e92
https://github.com/llvm/llvm-project/commit/a779a169931c0738bf43dc50fc545c1e88597e92
Author: Marco Antognini <marco.antognini at arm.com>
Date: 2020-10-22 (Thu, 22 Oct 2020)
Changed paths:
M clang/include/clang/Basic/OpenCLExtensions.def
M clang/lib/Basic/Targets/AMDGPU.h
M clang/lib/Basic/Targets/NVPTX.h
M clang/test/Misc/amdgcn.languageOptsOpenCL.cl
M clang/test/Misc/nvptx.languageOptsOpenCL.cl
M clang/test/Misc/r600.languageOptsOpenCL.cl
M clang/test/SemaOpenCL/extension-version.cl
Log Message:
-----------
[OpenCL] Remove unused extensions
Many non-language extensions are defined but also unused. This patch
removes them with their tests as they do not require compiler support.
The cl_khr_select_fprounding_mode extension is also removed because it
has been deprecated since OpenCL 1.1 and Clang doesn't have any specific
support for it.
The cl_khr_context_abort extension is only referred to in "The OpenCL
Specification", version 1.2 and 2.0, in Table 4.3, but no specification
is provided in "The OpenCL Extension Specification" for these versions.
Because it is both unused in Clang and lacks specification, this
extension is removed.
The following extensions are platform extensions that bring new OpenCL
APIs but do not impact the kernel language nor require compiler support.
They are therefore removed.
- cl_khr_gl_sharing, introduced in OpenCL 1.0
- cl_khr_icd, introduced in OpenCL 1.2
- cl_khr_gl_event, introduced in OpenCL 1.1
Note: this extension adds a new API to create cl_event but it also
specifies that these can only be used by clEnqueueAcquireGLObjects.
Hence, they cannot be used on the device side and the extension does
not impact the kernel language.
- cl_khr_d3d10_sharing, introduced in OpenCL 1.1
- cl_khr_d3d11_sharing, introduced in OpenCL 1.2
- cl_khr_dx9_media_sharing, introduced in OpenCL 1.2
- cl_khr_image2d_from_buffer, introduced in OpenCL 1.2
- cl_khr_initialize_memory, introduced in OpenCL 1.2
- cl_khr_gl_depth_images, introduced in OpenCL 1.2
Note: this extension is related to cl_khr_depth_images but only the
latter adds new features to the kernel language.
- cl_khr_spir, introduced in OpenCL 1.2
- cl_khr_egl_event, introduced in OpenCL 1.2
Note: this extension adds a new API to create cl_event but it also
specifies that these can only be used by clEnqueueAcquire* API
functions. Hence, they cannot be used on the device side and the
extension does not impact the kernel language.
- cl_khr_egl_image, introduced in OpenCL 1.2
- cl_khr_terminate_context, introduced in OpenCL 1.2
The minimum required OpenCL version used in OpenCLExtensions.def for
these extensions is not always correct. Removing these address that
issue.
Reviewed By: Anastasia
Differential Revision: https://reviews.llvm.org/D89372
More information about the All-commits
mailing list