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

Benyei, Guy guy.benyei at intel.com
Thu Feb 14 08:41:56 PST 2013


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opencl_restriction_b3.patch
Type: application/octet-stream
Size: 8831 bytes
Desc: opencl_restriction_b3.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130214/9155b078/attachment.obj>


More information about the cfe-commits mailing list