[PATCH] D20249: [OpenCL] Hierarchical/dynamic parallelism - enqueue kernel in OpenCL 2.0

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Tue May 17 13:19:35 PDT 2016


yaxunl added inline comments.

================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7820
@@ +7819,3 @@
+def err_opencl_function_not_supported : Error<
+  "this function is not supported in this version of CL">;
+def err_opencl_enqueue_kernel_incorrect_args : Error<
----------------
Anastasia wrote:
> This diagnostic should follow the latest version reporting style.
Is it better to move this msg to the generic msg part for OpenCL?

================
Comment at: lib/CodeGen/CGBuiltin.cpp:2150
@@ +2149,3 @@
+
+    if (NumArgs == 4) {
+      // The most basic form of the call with parameters:
----------------
Can we remove the non-vararg version and keep only the vararg version? The vararg can be empty, so the non-vararg version is redundant.

================
Comment at: lib/CodeGen/CGBuiltin.cpp:2174
@@ +2173,3 @@
+        // express to the runtime the number of variadic arguments.
+        std::vector<llvm::Value *> Args{Queue, Flags, Range, Block,
+                                        ConstantInt::get(IntTy, NumVaargs)};
----------------
Can we drop NumVaargs? It seem redundant.

================
Comment at: lib/Sema/SemaChecking.cpp:80
@@ +79,3 @@
+/// void*,
+/// which is a requirement of device side enqueue.
+static bool checkBlockArgs(Sema &S, Expr *BlockArg) {
----------------
joint with the previous line?

================
Comment at: lib/Sema/SemaChecking.cpp:150
@@ +149,3 @@
+/// void*'
+/// parameter of passed block.
+static bool checkEnqueueVariadicArgs(Sema &S, CallExpr *TheCall, Expr *BlockArg,
----------------
joint with previous line?

================
Comment at: lib/Sema/SemaChecking.cpp:201
@@ +200,3 @@
+///                    uint size0, ...)
+static bool SemaBuiltinOpenCLEnqueueKernel(Sema &S, CallExpr *TheCall) {
+  unsigned NumArgs = TheCall->getNumArgs();
----------------
rename to SemaOpenCLBuiltin... to be consistent with others?


http://reviews.llvm.org/D20249





More information about the cfe-commits mailing list