jvesely added a comment.
In http://reviews.llvm.org/D19932#465807, @yaxunl wrote:
> > this is not true. as I pointed out earlier, take a look at libclc headers.
> > a lot functions are defined for multiple types while maintaining type
> > safety.
>
> > there is no problem having TYPE * to_glob
yaxunl added a comment.
> this is not true. as I pointed out earlier, take a look at libclc headers. a
> lot functions are defined for multiple types while maintaining type safety.
> there is no problem having TYPE * to_global(TYPE *), for every permissible
> CLC type, declared in headers with
jvesely added a comment.
In http://reviews.llvm.org/D19932#465784, @yaxunl wrote:
> In http://reviews.llvm.org/D19932#465781, @jvesely wrote:
>
> > In http://reviews.llvm.org/D19932#465763, @cfe-commits wrote:
> >
> > > The returned pointer should point to the same pointee type as the
> > > argu
yaxunl added a comment.
In http://reviews.llvm.org/D19932#465781, @jvesely wrote:
> In http://reviews.llvm.org/D19932#465763, @cfe-commits wrote:
>
> > The returned pointer should point to the same pointee type as the argument.
> > Header file cannot guarantee that.
> >
> > Sam
>
>
> how come? i
jvesely added a comment.
In http://reviews.llvm.org/D19932#465763, @cfe-commits wrote:
> The returned pointer should point to the same pointee type as the argument.
> Header file cannot guarantee that.
>
> Sam
how come? is there a possibility to have two different types using the same
name?
...@arm.com
Cc: jan.ves...@rutgers.edu; Stellard, Thomas ;
cfe-commits@lists.llvm.org
Subject: Re: [PATCH] D19932: [OpenCL] Add to_{global|local|private} builtin
functions.
jvesely added a subscriber: jvesely.
jvesely added a comment.
Why couldn't this be declared in CLC header? There are mul
jvesely added a subscriber: jvesely.
jvesely added a comment.
Why couldn't this be declared in CLC header? There are multiple instances of
declaring functions for all available types in libclc (see for example convert
functions in convert.h).
Repository:
rL LLVM
http://reviews.llvm.org/D199
This revision was automatically updated to reflect the committed changes.
Closed by commit rL270261: [OpenCL] Add to_{global|local|private} builtin
functions. (authored by yaxunl).
Changed prior to commit:
http://reviews.llvm.org/D19932?vs=57478&id=57972#toc
Repository:
rL LLVM
http://revie
Anastasia accepted this revision.
Anastasia added a comment.
LGTM! Thanks!
http://reviews.llvm.org/D19932
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl updated this revision to Diff 57478.
yaxunl marked 8 inline comments as done.
yaxunl added a comment.
Revised as Anastasia suggested.
http://reviews.llvm.org/D19932
Files:
include/clang/Basic/Builtins.def
include/clang/Basic/DiagnosticSemaKinds.td
lib/CodeGen/CGBuiltin.cpp
lib/Se
Anastasia added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:501
@@ -500,1 +500,3 @@
def err_builtin_needs_feature : Error<"%0 needs target feature %1">;
+def err_builtin_needs_opencl_version
+: Error<"%0 needs OpenCL version %1%select{| or above}2"
pxli168 accepted this revision.
pxli168 added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: test/SemaOpenCL/to_addr_builtin.cl:26
@@ +25,3 @@
+#if __OPENCL_C_VERSION__ < CL_VERSION_2_0
+ // expected-error@-2{{'to_global' needs OpenCL version 2.0 o
Anastasia added inline comments.
Comment at: test/SemaOpenCL/to_addr_builtin.cl:26
@@ +25,3 @@
+#if __OPENCL_C_VERSION__ < CL_VERSION_2_0
+ // expected-error@-2{{'to_global' needs OpenCL version 2.0 or above}}
+#else
@Xiuli, I think Sam is right. Passing constant
yaxunl updated the summary for this revision.
yaxunl updated this revision to Diff 56915.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Removed dynamic generation of builtin decl. Added a test for mismatched
returned pointee types.
http://reviews.llvm.org/D19932
Files:
inc
yaxunl marked 8 inline comments as done.
Comment at: lib/Sema/SemaChecking.cpp:480
@@ +479,3 @@
+ .getQualifiers().getAddressSpace() == LangAS::opencl_constant) {
+S.Diag(Call->getLocStart(), diag::err_opencl_builtin_to_addr_invalid_arg)
+<< Call->getArg(0) << Cal
pxli168 added inline comments.
Comment at: test/SemaOpenCL/to_addr_builtin.cl:25
@@ +24,3 @@
+ glob = to_global(con);
+#if __OPENCL_C_VERSION__ < CL_VERSION_2_0
+ // expected-error@-2{{'to_global' needs OpenCL version 2.0 or above}}
yaxunl wrote:
> pxli168 wrote
Anastasia added inline comments.
Comment at: lib/Sema/SemaChecking.cpp:480
@@ +479,3 @@
+ .getQualifiers().getAddressSpace() == LangAS::opencl_constant) {
+S.Diag(Call->getLocStart(), diag::err_opencl_builtin_to_addr_invalid_arg)
+<< Call->getArg(0) << Call->getDi
yaxunl marked an inline comment as done.
yaxunl added a comment.
Updated summary.
Comment at: test/SemaOpenCL/to_addr_builtin.cl:25
@@ +24,3 @@
+ glob = to_global(con);
+#if __OPENCL_C_VERSION__ < CL_VERSION_2_0
+ // expected-error@-2{{'to_global' needs OpenCL version 2.0 or a
pxli168 added a comment.
You can update the SUMMARY of this diff as we are now using generic codegen
output.
And there are some inline comments about spec.
Comment at: test/SemaOpenCL/to_addr_builtin.cl:25
@@ +24,3 @@
+ glob = to_global(con);
+#if __OPENCL_C_VERSION__ < CL_VER
yaxunl updated this revision to Diff 56605.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Generate calls to void addr* to_addr(void*) with bitcasts.
http://reviews.llvm.org/D19932
Files:
include/clang/Basic/Builtins.def
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST
yaxunl marked 4 inline comments as done.
Comment at: test/SemaOpenCL/to_addr_builtin.cl:24
@@ +23,3 @@
+
+ glob = to_global(con);
+#if __OPENCL_C_VERSION__ < CL_VERSION_2_0
pxli168 wrote:
> should this return a NULL or a build error?
the function is declared as
pxli168 added a comment.
The pointer type seems to be not that important, we can just cast it to any
type we want.
Comment at: test/SemaOpenCL/to_addr_builtin.cl:24
@@ +23,3 @@
+
+ glob = to_global(con);
+#if __OPENCL_C_VERSION__ < CL_VERSION_2_0
should this r
yaxunl marked 5 inline comments as done.
yaxunl added a comment.
> I agree with Xiuli, if we don't have generic implementation with i8*, the
> libraries would have to contain every possible implementation of each AS
> conversion builtin including user defined types (which we don't even know
>
Anastasia added a comment.
In http://reviews.llvm.org/D19932#422374, @yaxunl wrote:
> In http://reviews.llvm.org/D19932#421961, @pxli168 wrote:
>
> > Could we output a generic function in CodeGen?
> > This seems to have no big difference to have a lot of declaration in an
> > opencl c header fi
yaxunl added a comment.
In http://reviews.llvm.org/D19932#421961, @pxli168 wrote:
> Could we output a generic function in CodeGen?
> This seems to have no big difference to have a lot of declaration in an
> opencl c header file.
What return type and argument type to use would you suggest for
pxli168 added a comment.
Could we output a generic function in CodeGen?
This seems to have no big difference to have a lot of declaration in an opencl
c header file.
http://reviews.llvm.org/D19932
___
cfe-commits mailing list
cfe-commits@lists.llvm
yaxunl updated this revision to Diff 56194.
yaxunl added a comment.
Update the test.
http://reviews.llvm.org/D19932
Files:
include/clang/Basic/Builtins.def
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/Decl.cpp
lib/CodeGen/CGBuiltin.cpp
lib/Sema/SemaChecking.cpp
lib/Sema/SemaEx
27 matches
Mail list logo