This revision was automatically updated to reflect the committed changes.
Closed by commit rL285700: [OpenCL] Override supported OpenCL extensions with
-cl-ext option (authored by bader).
Changed prior to commit:
https://reviews.llvm.org/D23712?vs=75568&id=76571#toc
Repository:
rL LLVM
http
asavonic updated this revision to Diff 75568.
asavonic added a comment.
- Fix comments and code formatting
https://reviews.llvm.org/D23712
Files:
include/clang/Basic/OpenCLOptions.h
include/clang/Basic/TargetInfo.h
include/clang/Basic/TargetOptions.h
include/clang/Driver/CC1Options.td
joey added a comment.
Two minor comments, but otherwise LGTM!
Comment at: include/clang/Basic/OpenCLOptions.h:33
// Enable all options.
+ void setAll(bool Enable = true) {
This comment needs to be changed, to reflect that they are now all enabled or
disa
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks!
https://reviews.llvm.org/D23712
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
asavonic updated this revision to Diff 73443.
asavonic added a comment.
- Describe OpenCLOptions::set() function
- Move -cl-ext option to cc1
- Reword -cl-ext option help
- Move -cl-ext handling out of target-specific code
- Add two more test cases regarding -cl-ext option
https://reviews.llvm.o
Anastasia added inline comments.
Comment at: include/clang/Basic/OpenCLOptions.h:39
@@ +38,3 @@
+
+ void set(llvm::StringRef Ext, bool Enable = true) {
+assert(!Ext.empty() && "Extension is empty.");
yaxunl wrote:
> Better add a comments for this function abo
yaxunl added a comment.
I think we need two more tests for concatenating and overriding the option, e.g
-cl-ext=-cl_khr_fp64 -cl-ext=+cl_khr_fp64
and
-cl-ext=-cl_khr_fp64,+cl_khr_fp64
Comment at: include/clang/Basic/OpenCLOptions.h:39
@@ +38,3 @@
+
+ void set(llvm::Strin
asavonic marked 3 inline comments as done.
Comment at: include/clang/Basic/OpenCLOptions.h:39
@@ +38,3 @@
+
+ void set(llvm::StringRef Ext, bool Enable = true) {
+assert(!Ext.empty() && "Extension is empty.");
yaxunl wrote:
> It seems Enable should be a local
asavonic updated this revision to Diff 72143.
asavonic added a comment.
Herald added a subscriber: yaxunl.
Add more test cases and fix minor issues
https://reviews.llvm.org/D23712
Files:
include/clang/Basic/OpenCLOptions.h
include/clang/Basic/TargetInfo.h
include/clang/Basic/TargetOptions
yaxunl added a comment.
I think we need two more tests for concatenating and overriding the option, e.g
-cl-ext=-cl_khr_fp64 -cl-ext=+cl_khr_fp64
and
-cl-ext=-cl_khr_fp64,+cl_khr_fp64
Comment at: include/clang/Basic/OpenCLOptions.h:35
@@ +34,3 @@
+ void setAll(bool Enabl
asavonic added a comment.
Hi @Anastasia,
Sorry for my late reply.
> > > What would be the use case to override the supported extensions for the
> > > end user?
>
> >
>
> >
>
> > Some extensions may be supported by the platform in general, but not by the
>
> > specific version of
Anastasia added a comment.
In https://reviews.llvm.org/D23712#524021, @asavonic wrote:
> In https://reviews.llvm.org/D23712#520818, @Anastasia wrote:
>
> > What would be the use case to override the supported extensions for the end
> > user?
>
>
> Some extensions may be supported by the platform
asavonic added a comment.
In https://reviews.llvm.org/D23712#520818, @Anastasia wrote:
> What would be the use case to override the supported extensions for the end
> user?
Some extensions may be supported by the platform in general, but not by the
specific version of the OpenCL runtime.
For
Anastasia added a comment.
What would be the use case to override the supported extensions for the end
user?
The change to set the right extensions based on the target compiled for was to
avoid mis-compilations. But adding a user flag to control that could lead to
the old problem to reoccur.
asavonic updated this revision to Diff 68677.
asavonic added a comment.
- Remove unused test case
https://reviews.llvm.org/D23712
Files:
include/clang/Basic/OpenCLOptions.h
include/clang/Basic/TargetInfo.h
include/clang/Basic/TargetOptions.h
include/clang/Driver/Options.td
lib/Basic/T
asavonic created this revision.
asavonic added a reviewer: Anastasia.
asavonic added a subscriber: cfe-commits.
This patch adds a command line option '-cl-ext' to control a set of
supported OpenCL extensions. Option accepts a comma-separated list
of extensions prefixed with '+' or '-'.
It can be
16 matches
Mail list logo