<div dir="ltr">The codegen test would imply adding a -cl-std=2.0 option to Clang, which it currently does not have. This is because the types should only be recognised if the CL 2.0 standard is explicitly asked for (the default is to operate on 1.2 mode). Adding that option is a peripheral issue. I've added the types on the header test under the appropriate "#if defined" but when I tried to do the same on the .cl file, I found out that the test parser does not recognise the preprocessor macro and therefore was causing the test to (incorrectly) fail. As such, I reverted the test.<br><div><br></div><div>As for the AS for the other types, I copy-pasted the code from event_t. That's the reason why I'm actually using the "0". Are you suggesting I should change event_t to use something else, and by consequence the new types too? That would be a separate issue.</div><div>My guess is that these types are allocated on the stack, which by llvm convention will always be 0.</div><div><br></div><div>The new types are used by new builtins. I don't think there are any other special semantics to it.</div><div><br></div><div>I've added extension checks on the MSAA types, but I'm not sure if this is the right place. New patch attached.</div><div><br></div><div>Pedro</div><br><div class="gmail_quote"><div dir="ltr">On Thu, 11 Jun 2015 at 10:33 Anastasia Stulova <<a href="mailto:Anastasia.Stulova@arm.com" target="_blank">Anastasia.Stulova@arm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Pedro,<br>
<br>
Could we also add a Codegen test? Also it would be better not to use constant directly as address space as the mapping could ideally be changed. Is there any reason why you generate pointers to private AS?<br>
<br>
Are there any operations allowed on new types? Any semantical checks needed?<br>
<br>
If MSAA types are part of an extension and not a part of the general standard we should ideally diagnose that extension is enabled when they are being used.<br>
<br>
Regards,<br>
Anastasia<br>
________________________________________<br>
From: <a href="mailto:cfe-commits-bounces@cs.uiuc.edu" target="_blank">cfe-commits-bounces@cs.uiuc.edu</a> [<a href="mailto:cfe-commits-bounces@cs.uiuc.edu" target="_blank">cfe-commits-bounces@cs.uiuc.edu</a>] On Behalf Of Pedro Ferreira [<a href="mailto:arkangath@gmail.com" target="_blank">arkangath@gmail.com</a>]<br>
Sent: Thursday, June 11, 2015 8:18 AM<br>
To: <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
Subject: [PATCH] OpenCL: Add new types for OpenCL 2.0<br>
<br>
Hi all,<br>
<br>
This patch adds the new OpenCL types for 2.0 described at <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.khronos.org_registry_cl_sdk_2.0_docs_man_xhtml_otherDataTypes.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=gZ-60t2gNkEX4z41fMAz82QTwD1bjVo6LmhtXuY5hEo&s=kEfotcV8P5hVZ47lWmHhEEKDhBODGkVz1pP02wMD2qY&e=" rel="noreferrer" target="_blank">https://www.khronos.org/registry/cl/sdk/2.0/docs/man/xhtml/otherDataTypes.html</a><<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.khronos.org_registry_cl_sdk_2.0_docs_man_xhtml_otherDataTypes.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=42YnWExwxwpeU6GPDY2_3RFxCqQakUbj_CXZsMsQ2jU&s=REOBNoaDio7qDyIDCqmXhxFvZYjMOK6vuXAttjOVsNI&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=https-3A__www.khronos.org_registry_cl_sdk_2.0_docs_man_xhtml_otherDataTypes.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=42YnWExwxwpeU6GPDY2_3RFxCqQakUbj_CXZsMsQ2jU&s=REOBNoaDio7qDyIDCqmXhxFvZYjMOK6vuXAttjOVsNI&e=</a>><br>
I also opened <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23794&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=gZ-60t2gNkEX4z41fMAz82QTwD1bjVo6LmhtXuY5hEo&s=ivEnfRqgZ1mySsoxU2k8B9s7tzYGaLCpZNGAbUg9pqc&e=" rel="noreferrer" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=23794</a><<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23794&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=42YnWExwxwpeU6GPDY2_3RFxCqQakUbj_CXZsMsQ2jU&s=TAV4suAMaHgdIPA83Da3pQl7c68On7bAFWtnrUbt_Uk&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23794&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=42YnWExwxwpeU6GPDY2_3RFxCqQakUbj_CXZsMsQ2jU&s=TAV4suAMaHgdIPA83Da3pQl7c68On7bAFWtnrUbt_Uk&e=</a>> for this. I keep forgetting you prefer patches sent to this mailing list.<br>
This also adds lldb entries (fixes switch warnings).<br>
<br>
The types are:<br>
<br>
image2d_depth_t<br>
image2d_array_depth_t<br>
image2d_msaa_t<br>
image2d_array_msaa_t<br>
image2d_msaa_depth_t<br>
image2d_array_msaa_depth_t<br>
queue_t<br>
ndrange_t<br>
clk_event_t<br>
reserve_id_t<br>
<br>
let me know if something looks wrong,<br>
Pedro<br>
<br>
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.<br>
<br>
ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2557590<br>
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No:  2548782<br>
<br>
</blockquote></div></div>