[cfe-dev] OpenCL parsing / type support

Arnaud Allard de Grandmaison Arnaud.AllardDeGrandMaison at dibcom.com
Wed Mar 10 10:34:27 PST 2010


>> 1. address space qualifiers (eg., __global float*, __constant int,
>> __local char*)
>> 2. function qualifiers (eg, __kernel void foo(...) ),
>> some builtin types (float4, float8, float16, image2d_t, etc.)
>These are not magic parser features, in the opencl implementations I'm
> aware of, these are macros that come from an implicit #include.  These are > #defines for various attributes, __global typically turns into
> __attribute__((address_space.  __kernel turns into attribute(annotate)

Although not magic parser feature per se, in the case of the address_space attributes this requires modifying clang to accept them nicely in the function prototypes. I have a patch for this for llvm/clang-2.6, and I plan to provided a patch for clang-head soon.

--
Arnaud de Grandmaison

_______________________________________________
cfe-dev mailing list
cfe-dev at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list