Anastasia added a comment.
I think it would be good to add a block test to CodeGenOpenCL where we would
just call the block without any enqueue and check that the invoke function is
generated but the kernel wrapper isn't.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:2846
+ PtrToSizeArray};
+ std::vector<llvm::Type *> ArgTys = {QueueTy,
+ IntTy,
----------------
Formatting seems inconsistent from above.
================
Comment at: lib/CodeGen/CodeGenFunction.h:2921
private:
- /// Helpers for blocks
- llvm::Value *EmitBlockLiteral(const CGBlockInfo &Info);
+ /// Helpers for blocks. Returns invoke function by \p InvokeF if it is not
+ /// nullptr.
----------------
It will be nullptr in case block is not enqueued? May be it's worth explaining
it in the comment.
================
Comment at: lib/CodeGen/TargetInfo.h:290
}
+ /// Create an OpenCL kernel for an enqueued block.
+ virtual llvm::Function *
----------------
Can we also explain the wrapper kernel here?
https://reviews.llvm.org/D38134
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits