[cfe-users] Emit LLVM IR from OpenCL
Zheng Wang via cfe-users
cfe-users at lists.llvm.org
Fri Jan 15 10:12:00 PST 2016
Hi,
Could anybody give me an example of emitting LLVM IR from OpenCL code?
I tried this for the backprop benchmark from the rodinia benchmark suite:
clang -x cl backprop_kernel.cl -emit-llvm -S -o backprop_kernel.ll
and the the following warning:
backprop_kernel.cl:24:13: warning: implicit declaration of function
'get_group_id' is invalid in C99 [-Wimplicit-function-declaration]
int by = get_group_id(1);
^
backprop_kernel.cl:25:13: warning: implicit declaration of function
'get_local_id' is invalid in C99 [-Wimplicit-function-declaration]
int tx = get_local_id(0);
^
backprop_kernel.cl:34:3: warning: implicit declaration of function
'barrier' is invalid in C99 [-Wimplicit-function-declaration]
barrier(CLK_LOCAL_MEM_FENCE);
^
3 warnings generated.
Does it seem okay?
--
Cheers,
Zheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20160115/69df85b2/attachment.html>
More information about the cfe-users
mailing list