[PATCH] OpenCL/SPIR - fix kernel_arg_type metadata node

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Wed Jul 30 06:28:25 PDT 2014


Hi,

Is 'unsigned' (without the type name) legal in OpenCL C like it's in C?
If so, it might still break with this (converts to 'u' instead of 
'uint'?). Otherwise LGTM.

On 07/30/2014 02:04 PM, Fraser Cormack wrote:
> Hi,
>
> This patch fixes a bug where the OpenCL kernel_arg_type metadata node
> can mistakenly switch "unsigned" to "u" for non-canonical types.
>
> Before,
>
>      typedef unsigned int myunsignedint;
>      kernel void foo4(__global unsigned int * X, __global myunsignedint
> * Y) {}
>
> would have produced:
>
>      metadata !{metadata !"kernel_arg_type", metadata !"uint*", metadata
> !"myunt*"}
>
> As it switched any occurrence of "unsigned " to "u".
>
> Cheers,
> Fraser
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>


-- 
--Pekka



More information about the cfe-commits mailing list