[cfe-dev] [RFC] OpenCL: Allow enabling/disabling an extension by command line options

Bader, Alexey via cfe-dev cfe-dev at lists.llvm.org
Tue Sep 20 03:18:15 PDT 2016


Hi Sam,

I think this feature is useful and there is an alternative solution under review here: https://reviews.llvm.org/D23712.
This solution introduces new command line option to enable/disable supported OpenCL extensions. This approach doesn't overload meaning of -D and -U option and allows controlling all extensions at once: enable/disable all.

Thanks,
Alexey

From: Liu, Yaxun (Sam) [mailto:Yaxun.Liu at amd.com]
Sent: Monday, September 19, 2016 11:46 PM
To: cfe-dev (cfe-dev at lists.llvm.org) <cfe-dev at lists.llvm.org>; 'anastasia.stulova at arm.com' <anastasia.stulova at arm.com>; Bader, Alexey <alexey.bader at intel.com>
Cc: Morichetti, Laurent <Laurent.Morichetti at amd.com>; Sumner, Brian <Brian.Sumner at amd.com>
Subject: [RFC] OpenCL: Allow enabling/disabling an extension by command line options

Currently Clang defines supported OpenCL extensions for each target, and there is a feature under review for defining supported extensions in header files.

OpenCL runtime needs a flexible way to define supported extensions for a device in a specific environment. It is desirable to be able to enable/disable support of an extension by command line options.

One possible solution is to use -D and -U followed by the name of an extension to enable or disable support of the extension.

There may be multiple -D and -U options, each of which is followed by the name of an extension.

Basically, when Clang decides whether an extension is supported, it not only uses Target information, but also checks if the macro with the same name is defined or undefined.

Your feedback is welcome.

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/20160920/8ec46220/attachment.html>


More information about the cfe-dev mailing list