At least for me, I believe this is a very interesting project. I may consider contribute later on when it actually moves on.<div>To really optimizing OpenCL codes at backend is too challenging, because this relies on very much hardware specific information, which may not be disclosed.</div>
<div>So I fully agree to transform the code back to source when it is optimized. But why at the IR level, not the AST? Isn't transforming on AST much easier and reasonable?</div><div><br></div><div>------</div><div>Guoping<br>
<br><div class="gmail_quote">2011/10/5 Alberto Magni <span dir="ltr"><<a href="mailto:alberto.magni86@gmail.com">alberto.magni86@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi everybody,<br><br>for a research project I would like to use LLVM to optimize <br>OpenCL programs for GPUs.<br><br>Due to the lack of open-source back-ends and runtimes for<br>GPUs my idea is the following:<br>1) compile OpenCL C into LLVM-IR (for what I read on the ML<br>

full support is close, at least foreseeable),<br>2) apply LLVM transformations to the bitcode,<br>3) generate the OpenCL C code from the optimized bitcode,<br>4) use the official (Nvidia, AMD, Intel, ....) OpenCL compilers <br>

and runtimes for the actual execution of the optimized code<br><br>I know that the C backend is buggy and it is no more <br>supported but it still works with simple C programs.<br>Remeber that OpenCL programs are usually quite simple<br>

(no function pointers, etc...)<br><br>The main features to be added to the backend are:<br>1) the "__kernel" keyword,<br>2) the four address spaces keywords<br>3) vector data types<br>4) the half keyword<br><br>

My idea is to extensively verify the functionality the C-backend for <br>C programs (similar to OpenCL-C ones) and possibly add the listed features.<br><br>What do you think of this ? Is it feasible ?<br><br>Thank you,<br>
<font color="#888888">
<br>Alberto<br>
</font><br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>