[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)
Aniket Lal via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 27 01:10:17 PST 2024
================
@@ -127,7 +127,10 @@ static const BlockExpr *getBlockExpr(const Expr *E) {
void CGOpenCLRuntime::recordBlockInfo(const BlockExpr *E,
llvm::Function *InvokeF,
llvm::Value *Block, llvm::Type *BlockTy) {
- assert(!EnqueuedBlockMap.contains(E) && "Block expression emitted twice");
+
+ // FIXME: Since OpenCL Kernels are emitted twice (kernel version and stub
+ // version), its constituent BlockExpr will also be emitted twice.
+ // assert(!EnqueuedBlockMap.contains(E) && "Block expression emitted twice");
----------------
lalaniket8 wrote:
Added support to distinguish between BlockExpr emitted from Kernel and its device variant by adding a relevant flag in EnqueuedBlockInfo. Updated assert to look at this flag.
https://github.com/llvm/llvm-project/pull/115821
More information about the cfe-commits
mailing list