Skip to content

Commit 0c3e012

Browse files
authored
[NFC][SYCL] Do not add sycl_device attribute to OpenCL kernel (#1439)
Adding implicit sycl_device attribute is not required anymore due to refactoring in previous patches (2225ffd), We used to add implicit sycl_device attribute to outline device code, now device code outlining is performed by the CodeGen without using of this attribute. Signed-off-by: Mariya Podchishchaeva <[email protected]>
1 parent 8d23c19 commit 0c3e012

File tree

3 files changed

+0
-14
lines changed

3 files changed

+0
-14
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,6 @@ CreateOpenCLKernelDeclaration(ASTContext &Context, StringRef Name,
12201220
}
12211221
OpenCLKernel->setParams(Params);
12221222

1223-
OpenCLKernel->addAttr(SYCLDeviceAttr::CreateImplicit(Context));
12241223
OpenCLKernel->addAttr(OpenCLKernelAttr::CreateImplicit(Context));
12251224
OpenCLKernel->addAttr(AsmLabelAttr::CreateImplicit(Context, Name));
12261225
OpenCLKernel->addAttr(ArtificialAttr::CreateImplicit(Context));

clang/test/SemaSYCL/basic-kernel-wrapper.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ int main() {
7272

7373
// Check kernel wrapper attributes
7474

75-
// CHECK: SYCLDeviceAttr {{.*}} Implicit
7675
// CHECK: OpenCLKernelAttr {{.*}} Implicit
7776
// CHECK: AsmLabelAttr {{.*}} Implicit "{{.*}}kernel_wrapper{{.*}}"
7877
// CHECK: ArtificialAttr {{.*}} Implicit

clang/test/SemaSYCL/sycl-device-attr.cpp

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)