yaxunl added a comment.

In https://reviews.llvm.org/D38134#895848, @Anastasia wrote:

> 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.


we have test/CodeGenOpenCL/blocks.cl which only calls a block. I can add check 
to make sure no kernels generated.



================
Comment at: lib/CodeGen/CGBuiltin.cpp:2846
+          PtrToSizeArray};
+      std::vector<llvm::Type *> ArgTys = {QueueTy,
+                                          IntTy,
----------------
Anastasia wrote:
> Formatting seems inconsistent from above.
Will fix.


================
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.
----------------
Anastasia wrote:
> It will be nullptr in case block is not enqueued? May be it's worth 
> explaining it in the comment.
Will do.


================
Comment at: lib/CodeGen/TargetInfo.h:290
   }
+  /// Create an OpenCL kernel for an enqueued block.
+  virtual llvm::Function *
----------------
Anastasia wrote:
> Can we also explain the wrapper kernel here?
Will do.


https://reviews.llvm.org/D38134



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to