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>
<br>Alberto<br>