[PATCH] OpenCL images and samplers related restriction (6.9.b)

Benyei, Guy guy.benyei at intel.com
Thu Mar 7 03:40:17 PST 2013


Hi all,
Are there any more comments, or should I commit it?

Thanks
    Guy

-----Original Message-----
From: cfe-commits-bounces at cs.uiuc.edu [mailto:cfe-commits-bounces at cs.uiuc.edu] On Behalf Of Benyei, Guy
Sent: Thursday, February 14, 2013 18:42
To: Joey Gouly; Tanya Lattner; Richard Smith
Cc: cfe-commits at cs.uiuc.edu
Subject: RE: [PATCH] OpenCL images and samplers related restriction (6.9.b)

Thanks Joey,
Attached an updated patch.

Please review.

Guy


-----Original Message-----
From: Joey Gouly [mailto:joey.gouly at arm.com]
Sent: Thursday, February 14, 2013 15:49
To: Benyei, Guy; Tanya Lattner; Richard Smith
Cc: cfe-commits at cs.uiuc.edu
Subject: RE: [PATCH] OpenCL images and samplers related restriction (6.9.b)

Hi Guy,

Could you not merge the err_event_t_struct_field, err_image_field and err_sampler_field errors into one?

Then code like:
+  if (LangOpts.OpenCL)
+    if (T->isImageType())
+      Diag(Loc, diag::err_image_field) << (Record->isStruct() ? 0 : 1) 
+ <<
T;
+    else if (T->isSamplerT())
+      Diag(Loc, diag::err_sampler_field) << (Record->isStruct() ? 0 : 1);
+    else if (T->isEventT())
+      Diag(Loc, diag::err_event_t_struct_field) << (Record->isStruct() 
+ ? 0
: 1);

Would become

  if (LangOpts.OpenCL && (T->isImageType() || isEventT() || isSamplerT())
    Diag(Loc, diag::err_opencl_invalid_field) << (Record->isStruct() ? 0 :
1) << T;

The same for err_image_variable, err_image_pointer, err_image_array, err_image_return_type (and their sampler counterparts)

Just a thought,

Joey

From: cfe-commits-bounces at cs.uiuc.edu
[mailto:cfe-commits-bounces at cs.uiuc.edu] On Behalf Of Benyei, Guy
Sent: 14 February 2013 13:26
To: Tanya Lattner; Richard Smith
Cc: cfe-commits at cs.uiuc.edu
Subject: RE: [PATCH] OpenCL images and samplers related restriction (6.9.b)

Tanya and Richard,
Thanks for the review – attached the updated patch.

Please review

Thank
      Guy




---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the cfe-commits mailing list