Skip to content

Commit 1ce3803

Browse files
committed
[SYCL] Disable kernel stub for now (#28629)
642481a start to emit kernel stub for opencl, it affect the SPIR calling converision. However, the upstream only emit stub in GenerateCode, sycl code is emitted in EmitDeferred instead, so we end up not generating stub and only changed the kernel calling conversion. This PR disable the change to kernel calling conversion for now. If we want to enable kernel stub for sycl, we should follow up to emit the stub for sycl as well.
1 parent 549c8bc commit 1ce3803

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/CodeGen/Targets/SPIR.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ void SPIRVTargetCodeGenInfo::setCUDAKernelCallingConvention(
393393

394394
void CommonSPIRTargetCodeGenInfo::setOCLKernelStubCallingConvention(
395395
const FunctionType *&FT) const {
396+
// Disable kernel stub for sycl
397+
if (getABIInfo().getContext().getLangOpts().isSYCL())
398+
return;
396399
FT = getABIInfo().getContext().adjustFunctionType(
397400
FT, FT->getExtInfo().withCallingConv(CC_SpirFunction));
398401
}

0 commit comments

Comments
 (0)