[Patch] OpenCL kernel-arg-info

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Sun Feb 17 08:22:30 PST 2013


Hi,

You use "magic numbers" for the different address space ids.
Similarly the type qualifier bit masks could use some named
consts, IMO.

These are from the SPIR specs, but still, using some sort
of named constant/enum from a header file would clean it up.
There could be a header for the SPIR-specific constants?

The consumers for this metadata (at least the OpenCL
clGetKernelArgInfo() implementations) need to refer to these
numbers too.

+      if(ty.isRestrictQualified())        typeQuals |= 2;
+      if(pointeeTy.isConstQualified())    typeQuals |= 1;
+      if(pointeeTy.isVolatileQualified()) typeQuals |= 4;

Some white space issues.

On 02/17/2013 04:49 PM, Benyei, Guy wrote:
> Please review.

-- 
--Pekka




More information about the cfe-commits mailing list