[cfe-dev] OpenCL support

Alberto Magni alberto.magni86 at gmail.com
Fri Nov 26 02:49:48 PST 2010


Hi everybody,

I am a student at Politecnico di Milano.
For my Master thesis I am working on extending CLang in order to support
OpenCL.

I am working on CLang 2.8 refering to the version 1.1 of the OpenCL
standard.
I just finished adding the main OpenCL features to the Parser:

* function qualifier: __kernel
* type qualifiers: __constant, __global, __local, __private
* built-in vector data types are added by the preprocessor during the start
up.

The attached patch contains also a set of test cases, placed in the
test/OpenCL subdirectory.

_______________________________________
Missing Features:

* half data type
* built-in types:  image2d_t, image3d_t, sampler_t, event_t
* image access qualifiers: __read_only, __write_only, __read_write
* reserved data types

_______________________________________
Future development:

Now I plan to add the support for code generation.
This will require adding metadata for __kernel functions,
setting a specific addressspace for __constant variables and tagging
with metadata the alloca instructions for __local variables.

I plan to add the parser missing features only when I can generate the IR
for the simple features listed above.

Any suggestions would be greatly appreciated.

Bye bye

Alberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101126/b7c3fa6e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opencl_parser_patch.zip
Type: application/zip
Size: 24296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101126/b7c3fa6e/attachment.zip>


More information about the cfe-dev mailing list