================
@@ -1085,8 +1085,10 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const
CGBlockInfo &blockInfo) {
blockAddr.getPointer(),
ConvertType(blockInfo.getBlockExpr()->getType()));
if (IsOpenCL) {
- CGM.getOpenCLRuntime().recordBlockInfo(blockInfo.BlockExpression, InvokeFn,
- result, blockInfo.StructureType);
+ CGM.getOpenCLRuntime().recordBlockInfo(
+ blockInfo.BlockExpression, InvokeFn, result, blockInfo.StructureType,
+ CurGD && CurGD.isDeclOpenCLKernel() &&
+ (CurGD.getKernelReferenceKind() == KernelReferenceKind::Kernel));
----------------
lalaniket8 wrote:
I have implemented the emission of kernels as directly calling its respective
stubs. The kernel body only consists of a call to the stub. The stub contains
the kernel body and is emitted with `alwaysinline` attribute.
https://github.com/llvm/llvm-project/pull/115821
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits