Skip to content

Commit 94df314

Browse files
committed
[SYCL] Don't set alwaysinline for NativeCPU (#29546)
c3ce568 set all kernels with OpenCLKernelAttr with alwaysinline. We disabled the stub calling conversion for SYCL and NativeCPU, we should disable the alwaysinline for NativeCPU as well. Fix SYCL::check_device_code/native_cpu/native_cpu_subhandler.cpp
1 parent f56b784 commit 94df314

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6899,7 +6899,7 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD,
68996899
if (GD.getKernelReferenceKind() == KernelReferenceKind::Stub &&
69006900
!D->hasAttr<NoInlineAttr>() &&
69016901
!Fn->hasFnAttribute(llvm::Attribute::NoInline) &&
6902-
!D->hasAttr<OptimizeNoneAttr>() &&
6902+
!D->hasAttr<OptimizeNoneAttr>() && !LangOpts.SYCLIsNativeCPU &&
69036903
!Fn->hasFnAttribute(llvm::Attribute::OptimizeNone) &&
69046904
!ShouldAddOptNone) {
69056905
Fn->addFnAttr(llvm::Attribute::AlwaysInline);

0 commit comments

Comments
 (0)