[cfe-dev] [OpenCL] Turn on -fblocks by default for OpenCL 2.0

Anastasia Stulova via cfe-dev cfe-dev at lists.llvm.org
Thu May 12 10:04:58 PDT 2016


Replied to the review! I don't think we should go for such change! ;)

From: Liu, Yaxun (Sam) [mailto:Yaxun.Liu at amd.com]
Sent: 12 May 2016 17:18
To: Anastasia Stulova; Bader, Alexey; cfe-dev (cfe-dev at lists.llvm.org); Pan, Xiuli
Cc: nd
Subject: RE: [OpenCL] Turn on -fblocks by default for OpenCL 2.0

I just hope we can commit the header file soon, but if it needs to be re-written using macros to represent all builtin functions for saving space, it could take several more weeks.

Sam

From: Anastasia Stulova [mailto:Anastasia.Stulova at arm.com]
Sent: Thursday, May 12, 2016 11:45 AM
To: Liu, Yaxun (Sam) <Yaxun.Liu at amd.com<mailto:Yaxun.Liu at amd.com>>; Bader, Alexey <alexey.bader at intel.com<mailto:alexey.bader at intel.com>>; cfe-dev (cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>) <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>>; Pan, Xiuli <xiuli.pan at intel.com<mailto:xiuli.pan at intel.com>>
Cc: nd <nd at arm.com<mailto:nd at arm.com>>
Subject: RE: [OpenCL] Turn on -fblocks by default for OpenCL 2.0

Those types are part of C99 too and it is rather common to define them in the header files. I wouldn't overcomplicate Clang code with adding them unless there is a real benefit in that.

I think inclusion of headers is unavoidable anyways as we can't add everything from CL libs into Clang directly without affecting it's performance.

Also the headers will be hopefully committed upstream soon, and they can be used easily then.

Thanks,
Anastasia

From: Liu, Yaxun (Sam) [mailto:Yaxun.Liu at amd.com]
Sent: 12 May 2016 15:14
To: Bader, Alexey; cfe-dev (cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>); Anastasia Stulova; Pan, Xiuli
Subject: RE: [OpenCL] Turn on -fblocks by default for OpenCL 2.0

I agree it is better to define the vector types and probably the size_t, ptrdiff_t, intptr_t, uintptr_t types in Clang instead of header file. This allows user to use these types without include the header.

I plan to work on that.

Thanks.

Sam

From: Bader, Alexey [mailto:alexey.bader at intel.com]
Sent: Thursday, May 12, 2016 6:12 AM
To: Liu, Yaxun (Sam) <Yaxun.Liu at amd.com<mailto:Yaxun.Liu at amd.com>>; cfe-dev (cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>) <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>>; 'anastasia.stulova at arm.com' <anastasia.stulova at arm.com<mailto:anastasia.stulova at arm.com>>; Pan, Xiuli <xiuli.pan at intel.com<mailto:xiuli.pan at intel.com>>
Subject: RE: [OpenCL] Turn on -fblocks by default for OpenCL 2.0

Hi Sam,

Enabling blocks for OpenCL 2.0 by default makes sense to me.
I think it would be useful to define built-in vector types for OpenCL too. Right now they are defined in the header file.

Thanks,
Alexey

From: Liu, Yaxun (Sam) [mailto:Yaxun.Liu at amd.com]
Sent: Wednesday, May 11, 2016 9:51 PM
To: cfe-dev (cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>) <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>>; 'anastasia.stulova at arm.com' <anastasia.stulova at arm.com<mailto:anastasia.stulova at arm.com>>; Pan, Xiuli <xiuli.pan at intel.com<mailto:xiuli.pan at intel.com>>; Bader, Alexey <alexey.bader at intel.com<mailto:alexey.bader at intel.com>>
Subject: [OpenCL] Turn on -fblocks by default for OpenCL 2.0

OpenCL 2.0 supports blocks as core feature. However, Clang does not turn on blocks support by default for OpenCL 2.0. An option -fblocks has to be used to turn on blocks.

Should this be changed?

Thanks.

Sam

--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160512/7df79943/attachment.html>


More information about the cfe-dev mailing list