Skip to content

[SYCL] Remove kernel_signature_start from int header #2537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 1 addition & 23 deletions clang/lib/Sema/SemaSYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3747,30 +3747,8 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) {
}
O << "};\n\n";

O << "// indices into the kernel_signatures array, each representing a "
"start"
" of\n";
O << "// kernel signature descriptor subarray of the kernel_signatures"
" array;\n";
O << "// the index order in this array corresponds to the kernel name order"
" in the\n";
O << "// kernel_names array\n";
O << "static constexpr\n";
O << "const unsigned kernel_signature_start[] = {\n";
unsigned CurStart = 0;

for (unsigned I = 0; I < KernelDescs.size(); I++) {
auto &K = KernelDescs[I];
O << " " << CurStart;
if (I < KernelDescs.size() - 1)
O << ",";
O << " // " << K.Name << "\n";
CurStart += K.Params.size() + 1;
}
O << "};\n\n";

O << "// Specializations of KernelInfo for kernel function types:\n";
CurStart = 0;
unsigned CurStart = 0;

for (const KernelDesc &K : KernelDescs) {
const size_t N = K.Params.size();
Expand Down
5 changes: 0 additions & 5 deletions clang/test/CodeGenSYCL/kernel-param-acc-array-ih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
// CHECK-EMPTY:
// CHECK-NEXT: };

// CHECK: static constexpr
// CHECK-NEXT: const unsigned kernel_signature_start[] = {
// CHECK-NEXT: 0 // _ZTSZ4mainE8kernel_A
// CHECK-NEXT: };

// CHECK: template <> struct KernelInfo<class kernel_A> {

#include "Inputs/sycl.hpp"
Expand Down
5 changes: 0 additions & 5 deletions clang/test/CodeGenSYCL/kernel-param-member-acc-array-ih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
// CHECK-EMPTY:
// CHECK-NEXT: };

// CHECK: static constexpr
// CHECK-NEXT: const unsigned kernel_signature_start[] = {
// CHECK-NEXT: 0 // _ZTSZ4mainE8kernel_C
// CHECK-NEXT: };

// CHECK: template <> struct KernelInfo<class kernel_C> {

#include "Inputs/sycl.hpp"
Expand Down
7 changes: 0 additions & 7 deletions clang/test/CodeGenSYCL/kernel-param-pod-array-ih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@
// CHECK-EMPTY:
// CHECK-NEXT: };

// CHECK: static constexpr
// CHECK-NEXT: const unsigned kernel_signature_start[] = {
// CHECK-NEXT: 0, // _ZTSZ4mainE8kernel_B
// CHECK-NEXT: 2, // _ZTSZ4mainE8kernel_C
// CHECK-NEXT: 4 // _ZTSZ4mainE8kernel_D
// CHECK-NEXT: };

// CHECK: template <> struct KernelInfo<class kernel_B> {
// CHECK: template <> struct KernelInfo<class kernel_C> {
// CHECK: template <> struct KernelInfo<class kernel_D> {
Expand Down
6 changes: 0 additions & 6 deletions clang/test/CodeGenSYCL/stdtypes_kernel_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
// CHECK-NEXT: //--- _ZTSl
// CHECK-EMPTY:
// CHECK-NEXT: };
//
// CHECK: static constexpr
// CHECK-NEXT: const unsigned kernel_signature_start[] = {
// CHECK-NEXT: 0, // _ZTSm
// CHECK-NEXT: 1 // _ZTSl
// CHECK-NEXT: };

// CHECK: template <> struct KernelInfo<unsigned long> {
// CHECK: template <> struct KernelInfo<long> {
Expand Down
5 changes: 0 additions & 5 deletions clang/test/CodeGenSYCL/union-kernel-param-ih.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
// CHECK-EMPTY:
// CHECK-NEXT:};

// CHECK: static constexpr
// CHECK-NEXT: const unsigned kernel_signature_start[] = {
// CHECK-NEXT: 0 // _ZTSZ4mainE8kernel_A
// CHECK-NEXT: };

// CHECK: template <> struct KernelInfo<class kernel_A> {

union MyUnion {
Expand Down
5 changes: 0 additions & 5 deletions clang/test/CodeGenSYCL/wrapped-accessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
// CHECK-EMPTY:
// CHECK-NEXT: };

// CHECK: static constexpr
// CHECK-NEXT: const unsigned kernel_signature_start[] = {
// CHECK-NEXT: 0 // _ZTSZ4mainE14wrapped_access
// CHECK-NEXT: };

// CHECK: template <> struct KernelInfo<class wrapped_access> {

#include "Inputs/sycl.hpp"
Expand Down