[PATCH] OpenCL/SPIR - kernel_arg_base_type metadata node

Fraser Cormack fraser at codeplay.com
Wed Jul 30 02:22:16 PDT 2014


Hi Pekka,

Thanks for your input. Interesting you should bring that up. I inherited 
that branch from the existing code dealing with kernel_arg_type, and I 
was thinking that it could sometimes provide incorrect metadata.

For instance, if someone did "typedef uint myunsignedinteger" then from 
what I can see, kernel_arg_type would report it as "myuinteger" which 
would probably not be conformant. What do you think?

I'll work on that test case for this, then I can perhaps later provide a 
patch which fixes the possible bug in the unsigned -> u logic.

Cheers,
Fraser

On 29/07/14 18:51, Pekka Jääskeläinen wrote:
> Hi Fraser,
>
> On 07/28/2014 07:36 PM, Fraser Cormack wrote:
>> +      // Turn "unsigned type" to "utype"
>> +      pos = baseTypeName.find("unsigned");
>> +      if (pos != std::string::npos)
>> +        baseTypeName.erase(pos+1, 8);
>
> Can you add a test case that exercises this branch?
>
> Otherwise, LGTM.
>


-- 
Fraser Cormack
Compiler Developer
Codeplay Software Ltd
45 York Place, Edinburgh, EH1 3HP
Tel: 0131 466 0503
Fax: 0131 557 6600
Website: http://www.codeplay.com
Twitter: https://twitter.com/codeplaysoft

This email and any attachments may contain confidential and /or privileged information and  is for use  by the addressee only. If you are not the intended recipient, please notify Codeplay Software Ltd immediately and delete the message from your computer. You may not copy or forward it,or use or disclose its contents to any other person. Any views or other information in this message which do not relate to our business are not authorized by Codeplay software Ltd, nor does this message form part of any contract unless so stated.
As internet communications are capable of data corruption Codeplay Software Ltd does not accept any responsibility for any changes made to this message after it was sent. Please note that Codeplay Software Ltd does not accept any liability or responsibility for viruses and it is your responsibility to scan any attachments.
Company registered in England and Wales, number: 04567874
Registered office: 81 Linkfield Street, Redhill RH1 6BY




More information about the cfe-commits mailing list