[cfe-dev] [OpenCL] RFC: let Clang generate llvm atomic instructions for OpenCL atomic builtin functions

Bader, Alexey via cfe-dev cfe-dev at lists.llvm.org
Fri Mar 4 08:21:52 PST 2016


Hi Sam,

Could you clarify your idea?
At the moment clang doesn't provide any OpenCL built-in functions - they are provided by OpenCL implementation.
Clang provides C11 atomic built-ins<http://clang.llvm.org/docs/LanguageExtensions.html#c11-atomic-builtins> which should produce desired llvm atomic instructions.
This should work for OpenCL v2.0 atomics since they are taken from C11.

Thanks,
Alexey

From: Liu, Yaxun (Sam) [mailto:Yaxun.Liu at amd.com]
Sent: Thursday, March 3, 2016 11:37 PM
To: Bader, Alexey; 'anastasia.stulova at arm.com'; Pan, Xiuli; cfe-dev at lists.llvm.org
Cc: Sumner, Brian
Subject: RE: [OpenCL] RFC: let Clang generate llvm atomic instructions for OpenCL atomic builtin functions

Hi,

OpenCL atomic builtin functions are similar to llvm atomic instructions. It seems natural to represent OpenCL atomic builtin functions by LLVM atomic instructions.

Doing this can simplify implementation of OpenCL builtin library and have a unified representation for OpenCL atomic builtin functions.

Any feedback? 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/20160304/1ce7beac/attachment.html>


More information about the cfe-dev mailing list