[PATCH] D42532: [OpenCL] Add "cles_khr_int64" extension.
Fznamznon created this revision. Herald added subscribers: cfe-commits, Anastasia, yaxunl. For OpenCL 1.1 embedded profile 64 bit integers i.e. long, ulong including the appropriate vector data types and operations on 64-bit integers are optional. The "cles_khr_int64" extension string will be reported if the embedded profile implementation supports 64-bit integers. Repository: rC Clang https://reviews.llvm.org/D42532 Files: include/clang/Basic/OpenCLExtensions.def test/SemaOpenCL/extension-version.cl Index: test/SemaOpenCL/extension-version.cl === --- test/SemaOpenCL/extension-version.cl +++ test/SemaOpenCL/extension-version.cl @@ -131,6 +131,15 @@ #endif #pragma OPENCL EXTENSION cl_khr_d3d10_sharing: enable +#if (__OPENCL_C_VERSION__ >= 110) +#ifndef cles_khr_int64 +#error "Missing cles_khr_int64 define" +#endif +#else +// expected-warning@+2{{unsupported OpenCL extension 'cles_khr_int64' - ignoring}} +#endif +#pragma OPENCL EXTENSION cles_khr_int64: enable + #if (__OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_context_abort #error "Missing cl_context_abort define" Index: include/clang/Basic/OpenCLExtensions.def === --- include/clang/Basic/OpenCLExtensions.def +++ include/clang/Basic/OpenCLExtensions.def @@ -53,6 +53,9 @@ OPENCLEXT_INTERNAL(cl_khr_gl_event, 110, ~0U) OPENCLEXT_INTERNAL(cl_khr_d3d10_sharing, 110, ~0U) +// EMBEDDED_PROFILE +OPENCLEXT_INTERNAL(cles_khr_int64, 110, ~0U) + // OpenCL 1.2. OPENCLEXT_INTERNAL(cl_khr_context_abort, 120, ~0U) OPENCLEXT_INTERNAL(cl_khr_d3d11_sharing, 120, ~0U) Index: test/SemaOpenCL/extension-version.cl === --- test/SemaOpenCL/extension-version.cl +++ test/SemaOpenCL/extension-version.cl @@ -131,6 +131,15 @@ #endif #pragma OPENCL EXTENSION cl_khr_d3d10_sharing: enable +#if (__OPENCL_C_VERSION__ >= 110) +#ifndef cles_khr_int64 +#error "Missing cles_khr_int64 define" +#endif +#else +// expected-warning@+2{{unsupported OpenCL extension 'cles_khr_int64' - ignoring}} +#endif +#pragma OPENCL EXTENSION cles_khr_int64: enable + #if (__OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_context_abort #error "Missing cl_context_abort define" Index: include/clang/Basic/OpenCLExtensions.def === --- include/clang/Basic/OpenCLExtensions.def +++ include/clang/Basic/OpenCLExtensions.def @@ -53,6 +53,9 @@ OPENCLEXT_INTERNAL(cl_khr_gl_event, 110, ~0U) OPENCLEXT_INTERNAL(cl_khr_d3d10_sharing, 110, ~0U) +// EMBEDDED_PROFILE +OPENCLEXT_INTERNAL(cles_khr_int64, 110, ~0U) + // OpenCL 1.2. OPENCLEXT_INTERNAL(cl_khr_context_abort, 120, ~0U) OPENCLEXT_INTERNAL(cl_khr_d3d11_sharing, 120, ~0U) ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D42532: [OpenCL] Add "cles_khr_int64" extension.
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM, but I'd like Anastasia to approve. Thanks. Repository: rC Clang https://reviews.llvm.org/D42532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D42532: [OpenCL] Add "cles_khr_int64" extension.
Anastasia added a comment. I am just a bit unclear about the use of this extension in the kernel language. Could you please clarify? Repository: rC Clang https://reviews.llvm.org/D42532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D42532: [OpenCL] Add "cles_khr_int64" extension.
Anastasia accepted this revision. Anastasia added a comment. Oh I guess it can be used to exclude the code with long? LGTM! Repository: rC Clang https://reviews.llvm.org/D42532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D42532: [OpenCL] Add "cles_khr_int64" extension.
This revision was automatically updated to reflect the committed changes. Closed by commit rL323522: [OpenCL] Add "cles_khr_int64" extension. (authored by bader, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D42532 Files: cfe/trunk/include/clang/Basic/OpenCLExtensions.def cfe/trunk/test/SemaOpenCL/extension-version.cl Index: cfe/trunk/include/clang/Basic/OpenCLExtensions.def === --- cfe/trunk/include/clang/Basic/OpenCLExtensions.def +++ cfe/trunk/include/clang/Basic/OpenCLExtensions.def @@ -53,6 +53,9 @@ OPENCLEXT_INTERNAL(cl_khr_gl_event, 110, ~0U) OPENCLEXT_INTERNAL(cl_khr_d3d10_sharing, 110, ~0U) +// EMBEDDED_PROFILE +OPENCLEXT_INTERNAL(cles_khr_int64, 110, ~0U) + // OpenCL 1.2. OPENCLEXT_INTERNAL(cl_khr_context_abort, 120, ~0U) OPENCLEXT_INTERNAL(cl_khr_d3d11_sharing, 120, ~0U) Index: cfe/trunk/test/SemaOpenCL/extension-version.cl === --- cfe/trunk/test/SemaOpenCL/extension-version.cl +++ cfe/trunk/test/SemaOpenCL/extension-version.cl @@ -131,6 +131,15 @@ #endif #pragma OPENCL EXTENSION cl_khr_d3d10_sharing: enable +#if (__OPENCL_C_VERSION__ >= 110) +#ifndef cles_khr_int64 +#error "Missing cles_khr_int64 define" +#endif +#else +// expected-warning@+2{{unsupported OpenCL extension 'cles_khr_int64' - ignoring}} +#endif +#pragma OPENCL EXTENSION cles_khr_int64: enable + #if (__OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_context_abort #error "Missing cl_context_abort define" Index: cfe/trunk/include/clang/Basic/OpenCLExtensions.def === --- cfe/trunk/include/clang/Basic/OpenCLExtensions.def +++ cfe/trunk/include/clang/Basic/OpenCLExtensions.def @@ -53,6 +53,9 @@ OPENCLEXT_INTERNAL(cl_khr_gl_event, 110, ~0U) OPENCLEXT_INTERNAL(cl_khr_d3d10_sharing, 110, ~0U) +// EMBEDDED_PROFILE +OPENCLEXT_INTERNAL(cles_khr_int64, 110, ~0U) + // OpenCL 1.2. OPENCLEXT_INTERNAL(cl_khr_context_abort, 120, ~0U) OPENCLEXT_INTERNAL(cl_khr_d3d11_sharing, 120, ~0U) Index: cfe/trunk/test/SemaOpenCL/extension-version.cl === --- cfe/trunk/test/SemaOpenCL/extension-version.cl +++ cfe/trunk/test/SemaOpenCL/extension-version.cl @@ -131,6 +131,15 @@ #endif #pragma OPENCL EXTENSION cl_khr_d3d10_sharing: enable +#if (__OPENCL_C_VERSION__ >= 110) +#ifndef cles_khr_int64 +#error "Missing cles_khr_int64 define" +#endif +#else +// expected-warning@+2{{unsupported OpenCL extension 'cles_khr_int64' - ignoring}} +#endif +#pragma OPENCL EXTENSION cles_khr_int64: enable + #if (__OPENCL_C_VERSION__ >= 120) #ifndef cl_khr_context_abort #error "Missing cl_context_abort define" ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits