[cfe-dev] [RFC] OpenCL: Allow enabling/disabling an extension by command line options
Liu, Yaxun (Sam) via cfe-dev
cfe-dev at lists.llvm.org
Tue Sep 20 08:32:44 PDT 2016
The alternative solution looks good to me.
From: Bader, Alexey [mailto:alexey.bader at intel.com]
Sent: Tuesday, September 20, 2016 6:18 AM
To: Liu, Yaxun (Sam) <Yaxun.Liu at amd.com>; cfe-dev (cfe-dev at lists.llvm.org) <cfe-dev at lists.llvm.org>; 'anastasia.stulova at arm.com' <anastasia.stulova at arm.com>
Cc: Morichetti, Laurent <Laurent.Morichetti at amd.com>; Sumner, Brian <Brian.Sumner at amd.com>; Savonichev, Andrew <andrew.savonichev at intel.com>
Subject: RE: [RFC] OpenCL: Allow enabling/disabling an extension by command line options
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.
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<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>>; Bader, Alexey <alexey.bader at intel.com<mailto:alexey.bader at intel.com>>
Cc: Morichetti, Laurent <Laurent.Morichetti at amd.com<mailto:Laurent.Morichetti at amd.com>>; Sumner, Brian <Brian.Sumner at amd.com<mailto: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.
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
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...
More information about the cfe-dev