[PATCH] D15914: [OpenCL] Pipe builtin functions

Xiuli PAN via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 9 01:29:10 PST 2016


pxli168 added a comment.

Then maybe I should hurry up to see if I can finish the Semacheck and this patch in time.
By the way, I just got the access to the llvm svn, can I just commit the pipe type patch directly as I see you all accepted it. Or I should send it to the cfe-commit first?


================
Comment at: lib/CodeGen/CGOpenCLRuntime.h:55
@@ -50,3 +54,3 @@
 };
 
 }
----------------
pekka.jaaskelainen wrote:
> > Additionally how would definitions of builtin with user defined types appear in the BIF libraries?
> 
> This is a good question. read_pipe should just work for any type of any size, thus we cannot just generate a new function for all possible sizes in advance, thus what Anastasia suggests here makes sense to me:
> 
> > One approach would be to just generate calls that would always use generic types
> 
> If now there was an additional parameter (always a constant) that stores the type's size it would not help much as one would need to generate a big switch...case that optimizes the access based on the packet size in case of a software pipe or a compiler pass that looks into that argument and generates (a call to) an optimized version?
> 
> I think combining the Anastasia proposed generic read/write_pipe with the metadata (that points to the packet's inner type or its size?) would be the best solution (so far).
Ok, I will send a patch in the best way so far.


http://reviews.llvm.org/D15914





More information about the cfe-commits mailing list