<div dir="ltr">Hi,<div><br></div><div>Could anybody give me an example of emitting LLVM IR from OpenCL code?</div><div><br></div><div>I tried this for the backprop benchmark from the rodinia benchmark suite:</div><div><br></div><div>clang -x cl <a href="http://backprop_kernel.cl">backprop_kernel.cl</a>  -emit-llvm -S -o backprop_kernel.ll</div><div><br></div><div>and the the following warning:</div><div><br clear="all"><div><div>backprop_kernel.cl:24:13: warning: implicit declaration of function 'get_group_id' is invalid in C99 [-Wimplicit-function-declaration]</div><div>   int by = get_group_id(1);</div><div>            ^</div><div>backprop_kernel.cl:25:13: warning: implicit declaration of function 'get_local_id' is invalid in C99 [-Wimplicit-function-declaration]</div><div>   int tx = get_local_id(0);</div><div>            ^</div><div>backprop_kernel.cl:34:3: warning: implicit declaration of function 'barrier' is invalid in C99 [-Wimplicit-function-declaration]</div><div>                barrier(CLK_LOCAL_MEM_FENCE);</div><div>                ^</div><div>3 warnings generated.</div></div><div><br></div><div>Does it seem okay? </div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Cheers,<div>Zheng</div></div></div>
</div></div>