[PATCH] D16876: [OpenCL] Refine pipe builtin support

Xiuli PAN via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 5 17:55:42 PST 2016


pxli168 requested a review of this revision.
pxli168 added a reviewer: rsmith.
pxli168 added a comment.

Hi Richard/Anastasia,

I replied in the commit email, and here are some explains:

1. Without the space after comma the "//" will be aligned.
2. We want generic prototypes of the builtin functions, and we generate them in CodeGen. So there will be no use to perform conversion in sema for the function prototype.
3. We used generic prototypes and varadic function declration, the conversion in CodeGen use cast and won't change the original type for some arguments that maybe used elsewhere. (Also I do not understand very clear about how to convert in Sema)

Thanks
Xiuli


================
Comment at: lib/Sema/SemaChecking.cpp:294
@@ +293,3 @@
+             diag::err_opencl_builtin_pipe_invalid_access_modifier)
+          << "read_only" << Arg0->getSourceRange();
+      return true;
----------------
Anastasia wrote:
> Anastasia wrote:
> > Could we use getName() instead?
> > 
> > We could then also move this statement after the switch and just set an error flag here.
> Just to be clear getName() of the attr instead of passing the string (i.e. "read_only").
Here we need a different access qualifier then we have. I seems to complicated to generated a useless attribute here just for a name. 


http://reviews.llvm.org/D16876





More information about the cfe-commits mailing list