yaxunl added a comment.
In https://reviews.llvm.org/D23322#512732, @Anastasia wrote:
> Is this related to our discussion on cfe-dev about the extensions and also
> the earlier review you have created: https://reviews.llvm.org/D21698?
Since that feature takes time to implement, we decide to add
yaxunl added a comment.
In https://reviews.llvm.org/D23322#512823, @Anastasia wrote:
> Ok, sure. Is the plan to refactor this bit in case we implement the generic
> support later then?
>
> It seems fine, although I can't check much without any documentation. Is
> there any reference available o
yaxunl marked an inline comment as done.
yaxunl added a comment.
In https://reviews.llvm.org/D23361#512729, @Anastasia wrote:
> I think Clang is supposed to generate the IR specific to the target
> architecture. It seems strange to ignore the pointer size. I am not sure if
> it might lead to so
yaxunl added a comment.
In https://reviews.llvm.org/D23322#513792, @Anastasia wrote:
> Do you think testing the declaration to be available without/with an error
> after the extension is enabled/disabled might be useful too?
I feel it is not so useful for a specific extension.
When the featur
yaxunl added a comment.
Actually we need to assume ndrange_t is a user defined typedef instead of
struct due to the way its used in the spec, e.g.
void f(ndrange_t x);
instead of
void f(struct ndrange_t x);
Then it may be a little bit tricky to decide whether a type is ndrange_t type.
An
yaxunl added a comment.
How about we decide if a type is ndrange_t type based on their canonical types.
If the canonical type of type X is the same as the canonical type of ndrange_t
type, then type X is treated as ndrange_t type. Is this reasonable?
Repository:
rL LLVM
https://reviews.llvm
yaxunl added a comment.
In https://reviews.llvm.org/D23086#515443, @Anastasia wrote:
> In https://reviews.llvm.org/D23086#514279, @yaxunl wrote:
>
> > How about we decide if a type is ndrange_t type based on their canonical
> > types. If the canonical type of type X is the same as the canonical
yaxunl added a comment.
In https://reviews.llvm.org/D23086#515506, @Anastasia wrote:
>
> Surely vendors can re-implement all OpenCL types with an implicit typedef.
> For example this would just work:
>
> typedef int queue_t;
> void bar(queue_t q);
>
>
> I am afraid we will ne
yaxunl updated this revision to Diff 46526.
yaxunl added a comment.
update the tests.
http://reviews.llvm.org/D16686
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/
yaxunl updated this revision to Diff 46570.
yaxunl marked 7 inline comments as done.
yaxunl added a comment.
Revised as Anastasia suggested.
http://reviews.llvm.org/D16686
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticParseKinds.td
incl
yaxunl updated this revision to Diff 46608.
yaxunl added a comment.
Add test for negative unroll hint value as suggested by Xiuli.
http://reviews.llvm.org/D16686
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticParseKinds.td
include/clang/
yaxunl updated this revision to Diff 46651.
yaxunl marked 9 inline comments as done.
yaxunl added a comment.
Revised as Xiuli and Anastasia suggested.
http://reviews.llvm.org/D16686
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticParseKinds
yaxunl updated this revision to Diff 46783.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Revised as Xiuli suggested.
With the change, there will be quotation marks around the attribute name, so
other diagnostics are also changed to be consistent.
http://reviews.llvm.org/D16
yaxunl closed this revision.
yaxunl added a comment.
committed
http://reviews.llvm.org/D16692
___
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 46838.
yaxunl marked 3 inline comments as done.
yaxunl added a comment.
Revised as Anastasia suggested.
http://reviews.llvm.org/D16686
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticParseKinds.td
incl
yaxunl added a comment.
Thanks Xiuli.
It seems the review was not closed automatically due to missing Differential
Revision: at the end of commit message. Next time I will add the url to
the review summary.
http://reviews.llvm.org/D16692
___
cfe
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: lib/Sema/SemaChecking.cpp:343
@@ -332,3 +342,3 @@
// Two kinds of read/write pipe
// From OpenCL C Specification 6.13.16.2 the built-in read/write
//
yaxunl updated the summary for this revision.
yaxunl updated this revision to Diff 46961.
yaxunl marked 3 inline comments as done.
yaxunl added a comment.
Revised as Xiuli suggested.
Add test for OpenCL below 2.0.
Add diagnostic for opencl_unroll_hint attribute used below OpenCL 2.0.
http://revi
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks.
http://reviews.llvm.org/D16876
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listin
yaxunl updated this revision to Diff 47337.
yaxunl marked 4 inline comments as done.
yaxunl added a comment.
Sorry for the delay.
Revised as Xiuli suggested.
http://reviews.llvm.org/D16686
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticPa
yaxunl updated this revision to Diff 47460.
yaxunl added a comment.
merge two sema tests as one as Anastasia suggested.
http://reviews.llvm.org/D16686
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/Diagn
yaxunl updated this revision to Diff 47716.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Revised as Anastasia suggested.
Changed comments.
http://reviews.llvm.org/D16686
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticP
yaxunl added a comment.
I am not sure about the restriction that program scope pointer must point to
global or constant addr space. Can you provide reference to the OpenCL 2.0 spec?
https://www.khronos.org/registry/cl/specs/opencl-2.0-openclc.pdf
On page 36 there are examples for program-scope
yaxunl added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7653
@@ -7654,1 +7652,3 @@
+def err_opencl_function_variable : Error<
+ "%select{non-kernel function|non-program scope}0 variable cannot be declared
in %1 address space">;
def err_static_functi
yaxunl added a comment.
ping
http://reviews.llvm.org/D16686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl added inline comments.
Comment at: test/SemaOpenCL/invalid-pipes-cl2.0.cl:9
@@ -8,1 +8,3 @@
}
+void test4() {
+ pipe int p; // expected-error {{pipe can only be used as a function
parameter}}
Do we have a test for diagnosing pipe type for OCL < 2.0 ?
h
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks.
Comment at: test/SemaOpenCL/storageclass-cl20.cl:23
@@ -19,1 +22,3 @@
+ extern global int G5;
+ extern int G6; // expected-error{{program scope variable must r
yaxunl added a comment.
do we need to add a test that pointer to sampler is invalid?
http://reviews.llvm.org/D17437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks!
Comment at: lib/Sema/SemaType.cpp:2180
@@ -2179,1 +2179,3 @@
+ // OpenCL v2.0 s6.16.13.1 - Arrays of pipe type are not supported.
+ // OpenCL v2.0 s6.9.b - Ar
yaxunl added inline comments.
Comment at: test/SemaOpenCL/storageclass-cl20.cl:11
@@ -10,3 +10,3 @@
static global int S2 = 5;
- static private int S3 = 5;// expected-error{{program scope variable must
reside in global or constant address space}}
+ static private int S3 = 5;
yaxunl updated the summary for this revision.
yaxunl removed a reviewer: pekka.jaaskelainen.
yaxunl added a subscriber: pekka.jaaskelainen.
yaxunl set the repository for this revision to rL LLVM.
yaxunl updated this revision to Diff 48967.
yaxunl marked 5 inline comments as done.
yaxunl added a com
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
Pls revise by Anastasia's comments. Otherwise LGTM.
We have two options about SPIR-V support:
1. drop SPIR support and move on to SPIR-V
2. keep supporting both SPIR and SPIR-V
Option 1 is cl
yaxunl accepted this revision.
yaxunl added a comment.
LGTM. Thanks.
http://reviews.llvm.org/D16876
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl marked 2 inline comments as done.
Comment at: lib/Sema/SemaExpr.cpp:6194-6203
@@ +6193,12 @@
+
+ incompatTy = S.Context.getPointerType(
+ S.Context.getAddrSpaceQualType(S.Context.VoidTy, ResultAddrSpace));
+ LHS = S.ImpCastExprToType(LHS.get(), incompatTy
yaxunl added a comment.
Hi Anastasia/Richard,
I found this issue when investigating some codegen issues in Clang -cc1 with
-emit-llvm. I need to pass an llvm option -print-after-all to the LLVM pass
manager which is used to run the optimization passes before emitting llvm.
However it did not w
Author: yaxunl
Date: Tue Apr 26 14:25:46 2016
New Revision: 267590
URL: http://llvm.org/viewvc/llvm-project?rev=267590&view=rev
Log:
[OpenCL] Add predefined macros.
OpenCL spec requires __OPENCL_C_VERSION__ to be defined based on -cl-std
option. This patch implements that.
The patch also define
This revision was automatically updated to reflect the committed changes.
Closed by commit rL267590: [OpenCL] Add predefined macros. (authored by yaxunl).
Changed prior to commit:
http://reviews.llvm.org/D19071?vs=55016&id=55066#toc
Repository:
rL LLVM
http://reviews.llvm.org/D19071
Files:
yaxunl added a comment.
LGTM
http://reviews.llvm.org/D19524
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl created this revision.
yaxunl added a reviewer: Anastasia.
yaxunl added subscribers: cfe-commits, tstellarAMD.
When comparing unqualified types, canonical types should be used, otherwise
equivalent types may be treated as different type.
For example,
typedef int int_t;
generic int* a;
gl
yaxunl updated this revision to Diff 55438.
yaxunl added a comment.
Removed accidentally inserted blanks.
http://reviews.llvm.org/D19662
Files:
lib/AST/ASTContext.cpp
test/CodeGenOpenCL/address-spaces-conversions.cl
Index: test/CodeGenOpenCL/address-spaces-conversions.cl
==
Author: yaxunl
Date: Thu Apr 28 12:34:57 2016
New Revision: 267906
URL: http://llvm.org/viewvc/llvm-project?rev=267906&view=rev
Log:
[OpenCL] Fix bug in mergeTypes which causes equivalent types treated as
different.
When comparing unqualified types, canonical types should be used, otherwise
equ
This revision was automatically updated to reflect the committed changes.
Closed by commit rL267906: [OpenCL] Fix bug in mergeTypes which causes
equivalent types treated as… (authored by yaxunl).
Changed prior to commit:
http://reviews.llvm.org/D19662?vs=55438&id=55440#toc
Repository:
rL LLV
yaxunl updated this revision to Diff 55600.
yaxunl added a comment.
Add defining macro cl_khr_ for supported extensions or optional core features.
Enable supported extensions or optional core features only if it is available
in the OpenCL version the program is compiled with.
Add spir triple to
yaxunl added inline comments.
Comment at: test/CodeGenOpenCL/builtins-r600.cl:2
@@ -1,3 +1,3 @@
// REQUIRES: amdgpu-registered-target
-// RUN: %clang_cc1 -triple r600-unknown-unknown -S -emit-llvm -o - %s |
FileCheck %s
+// RUN: %clang_cc1 -triple r600-unknown-unknown -target-cp
yaxunl updated this revision to Diff 55839.
yaxunl marked 2 inline comments as done.
yaxunl added a comment.
Add comments about macros for enumerating extensions.
Improve diagnostics about extensions.
http://reviews.llvm.org/D19484
Files:
include/clang/Basic/DiagnosticParseKinds.td
include/
yaxunl added inline comments.
Comment at: lib/Headers/opencl-c.h:4872
@@ +4871,3 @@
+
+#ifdef cl_khr_fp64
+char __const_func __attribute__((overloadable)) convert_char(double);
Anastasia wrote:
> Interesting, macro has the same name as an extension?
The spec requi
yaxunl added a comment.
typo. saved 300KB space.
http://reviews.llvm.org/D18369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl added a comment.
Hi Alexey,
Any comments on this patch?
Thanks.
http://reviews.llvm.org/D19484
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl created this revision.
yaxunl added reviewers: Anastasia, pxli168.
yaxunl added subscribers: cfe-commits, tstellarAMD.
OpenCL builtin functions to_{global|local|private} accepts argument of pointer
type to arbitrary pointee type, and return a pointer to the same pointee type
in different
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
yaxunl added a comment.
In http://reviews.llvm.org/D18369#421963, @pxli168 wrote:
> If we want to save some space, could we use some macro to expand the gentype
> or some script to expand the gentype into each types when the clang is build?
We need to balance between space and readability. Whe
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
yaxunl added inline comments.
Comment at: lib/Sema/SemaCast.cpp:2317
@@ +2316,3 @@
+// OpenCL v2.0 s6.13.10 - Allow casts from '0' to event_t type.
+if (Self.getLangOpts().OpenCL && DestType->isEventT()) {
+ llvm::APSInt intValue;
yaxunl wrote:
> tste
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
>
yaxunl added inline comments.
Comment at: lib/Headers/opencl-c.h:14057
@@ +14056,3 @@
+event_t __attribute__((overloadable)) async_work_group_copy(__local float2
*dst, const __global float2 *src, size_t num_elements, event_t event);
+event_t __attribute__((overloadable)) async_wo
yaxunl added a comment.
In http://reviews.llvm.org/D18369#424347, @pxli168 wrote:
> In http://reviews.llvm.org/D18369#422367, @yaxunl wrote:
>
> > In http://reviews.llvm.org/D18369#421963, @pxli168 wrote:
> >
> > > If we want to save some space, could we use some macro to expand the
> > > gentyp
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
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 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
yaxunl added a comment.
LGTM. Thanks.
http://reviews.llvm.org/D20090
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl created this revision.
yaxunl added reviewers: Anastasia, pxli168, bader.
yaxunl added subscribers: cfe-commits, tstellarAMD.
__builtin_astype does not generate correct LLVM IR for vec3 types. This patch
inserts bitcasts to/from vec4 when necessary in addition to generating vector
shuffle
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
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 accepted this revision.
yaxunl added a comment.
LGTM. Thanks!
http://reviews.llvm.org/D17578
___
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 57177.
yaxunl added a comment.
Fixed available OpenCL version for some extensions.
http://reviews.llvm.org/D19484
Files:
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/LangOptions.h
include/clang/Basic/OpenCLExtensions.def
include/cl
yaxunl marked 3 inline comments as done.
Comment at: lib/Headers/opencl-c.h:14057
@@ +14056,3 @@
+event_t __attribute__((overloadable)) async_work_group_copy(__local float2
*dst, const __global float2 *src, size_t num_elements, event_t event);
+event_t __attribute__((overloadable
Author: yaxunl
Date: Fri May 13 10:44:37 2016
New Revision: 269431
URL: http://llvm.org/viewvc/llvm-project?rev=269431&view=rev
Log:
[OpenCL] Add supported OpenCL extensions to target info.
Add supported OpenCL extensions to target info. It serves as default values to
save the users of the burde
This revision was automatically updated to reflect the committed changes.
Closed by commit rL269431: [OpenCL] Add supported OpenCL extensions to target
info. (authored by yaxunl).
Changed prior to commit:
http://reviews.llvm.org/D19484?vs=57177&id=57201#toc
Repository:
rL LLVM
http://review
Author: yaxunl
Date: Fri May 13 12:16:26 2016
New Revision: 269435
URL: http://llvm.org/viewvc/llvm-project?rev=269435&view=rev
Log:
Revert "[OpenCL] Add supported OpenCL extensions to target info."
Revert r269431 due to build failure caused by warning msg:
llvm/tools/clang/lib/Basic/Targets.c
yaxunl added inline comments.
Comment at: lib/Headers/opencl-c.h:17051
@@ +17050,3 @@
+#define CLK_SUCCESS 0
+#define CLK_ENQUEUE_FAILURE -101
+#define CLK_INVALID_QUEUE -102
Anastas
Author: yaxunl
Date: Mon May 16 12:06:34 2016
New Revision: 269670
URL: http://llvm.org/viewvc/llvm-project?rev=269670&view=rev
Log:
[OpenCL] Add supported OpenCL extensions to target info.
Add supported OpenCL extensions to target info. It serves as default values to
save the users of the burde
yaxunl added inline comments.
Comment at: lib/Headers/opencl-c.h:17051
@@ +17050,3 @@
+#define CLK_SUCCESS 0
+#define CLK_ENQUEUE_FAILURE -101
+#define CLK_INVALID_QUEUE -102
jprice
yaxunl updated this revision to Diff 57392.
yaxunl added a comment.
Add a test for casting char16 to i3 as Alexey suggested.
http://reviews.llvm.org/D20133
Files:
lib/CodeGen/CGExprScalar.cpp
test/CodeGenOpenCL/as_type.cl
Index: test/CodeGenOpenCL/as_type.cl
===
yaxunl updated this revision to Diff 57393.
yaxunl added a comment.
Update test.
http://reviews.llvm.org/D20133
Files:
lib/CodeGen/CGExprScalar.cpp
test/CodeGenOpenCL/as_type.cl
Index: test/CodeGenOpenCL/as_type.cl
===
--- /de
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
yaxunl added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7820
@@ +7819,3 @@
+def err_opencl_function_not_supported : Error<
+ "this function is not supported in this version of CL">;
+def err_opencl_enqueue_kernel_incorrect_args : Error<
--
yaxunl created this revision.
yaxunl added a reviewer: Anastasia.
yaxunl added subscribers: cfe-commits, tstellarAMD.
libclc fails to build due to some supported OpenCL extensions are not added to
nvptx target.
http://reviews.llvm.org/D20373
Files:
lib/Basic/Targets.cpp
Index: lib/Basic/Targ
yaxunl created this revision.
yaxunl added reviewers: Anastasia, pxli168, bader, rsmith.
yaxunl added a subscriber: cfe-commits.
Include opencl-c.h by default as a module to utilize the automatic AST caching
mechanism of module.
Add an option -fno-default-header to disable default header for Ope
Author: yaxunl
Date: Fri May 20 12:18:16 2016
New Revision: 270238
URL: http://llvm.org/viewvc/llvm-project?rev=270238&view=rev
Log:
[OpenCL] Allow explicit cast of 0 to event_t.
Patch by Aaron Enye Shi.
Differential Revision: http://reviews.llvm.org/D17578
Modified:
cfe/trunk/include/clang
This revision was automatically updated to reflect the committed changes.
Closed by commit rL270238: [OpenCL] Allow explicit cast of 0 to event_t.
(authored by yaxunl).
Changed prior to commit:
http://reviews.llvm.org/D17578?vs=56615&id=57951#toc
Repository:
rL LLVM
http://reviews.llvm.org/
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
Author: yaxunl
Date: Fri May 20 14:54:38 2016
New Revision: 270261
URL: http://llvm.org/viewvc/llvm-project?rev=270261&view=rev
Log:
[OpenCL] Add to_{global|local|private} builtin functions.
OpenCL builtin functions to_{global|local|private} accepts argument of pointer
type to arbitrary pointee
yaxunl updated this revision to Diff 51967.
yaxunl marked 2 inline comments as done.
yaxunl added a comment.
Revised as Aaron suggested.
http://reviews.llvm.org/D17861
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/
yaxunl added a comment.
Ping. Tom, are you OK with this fix?
http://reviews.llvm.org/D17552
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yaxunl marked 6 inline comments as done.
Comment at: lib/AST/ASTContext.cpp:7613
@@ +7612,3 @@
+if (getLangOpts().OpenCL) {
+ if (LHS.getUnqualifiedType() != RHS.getUnqualifiedType() ||
+ LQuals.getCVRQualifiers() != RQuals.getCVRQualifiers())
An
yaxunl added inline comments.
Comment at: test/SemaOpenCL/address-spaces-conversions-cl2.0.cl:276
@@ +275,3 @@
+ constant char *arg_const_ch;
+ var_void_const = 0 ? var_cond : arg_const_ch;
+#ifndef CONSTANT
Anastasia wrote:
> btw, what happens if we assign into
yaxunl updated this revision to Diff 52073.
yaxunl marked 6 inline comments as done.
yaxunl added a comment.
Revised by Anastasia's comments.
Added comments to code for cases 1a-c and 2a-c.
Added codegen test for missing cases of 1a-b and 2a-b.
Rename variables in sema test.
http://reviews.llvm
yaxunl updated this revision to Diff 52077.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Insert an empty line to the test for clarity.
http://reviews.llvm.org/D17861
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticSemaKi
yaxunl updated this revision to Diff 52080.
yaxunl marked 3 inline comments as done.
yaxunl added a comment.
Add back a blank line deleted by accident.
Add OpenCL to a comment.
http://reviews.llvm.org/D17412
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/ASTContext.cpp
lib/Sema
yaxunl added a comment.
In http://reviews.llvm.org/D18369#385799, @Anastasia wrote:
> Regarding half types since there is inconsistency in both headers (commented
> in CL1.2), should we just enable the extension cl_khr_fp16 in the header and
> then have the overloads with half there with all th
yaxunl added a comment.
> Rather than having a separate header for each version with another header for
> the common parts, couldn't we just have a single header that uses #if guards
> for the version specific functionality? e.g.
>
> size_t __attribute__((overloadable)) get_global_id(uint d
yaxunl added a comment.
Anastasia/Alexey/Xiuli,
Do you agree that we should have one single opencl.h instead of headers for
different OpenCL versions?
Since most 1.2 builtins are included in 2.0. I think this is doable.
If no objection, I will try to merge them into one header first then addre
yaxunl added a comment.
One of the difference between opencl-12.cl and opencl-20.cl is opencl-12.cl
defines
#define const_func __attribute__((const))
#define readonly __attribute__((pure))
and uses them for many functions, e.g.
float const_func __attribute__((overloadable)) acos(float);
yaxunl marked 2 inline comments as done.
Comment at: test/CodeGenOpenCL/address-spaces-conversions.cl:1
@@ -1,2 +1,2 @@
// RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0
-ffake-address-space-map -cl-std=CL2.0 -emit-llvm -o - | FileCheck %s
Anastasia w
yaxunl updated the summary for this revision.
yaxunl updated this revision to Diff 52431.
yaxunl added a comment.
Use CreatePointerBitCastOrAddrSpaceCast as John suggested.
http://reviews.llvm.org/D18713
Files:
lib/CodeGen/CGExprScalar.cpp
test/CodeGenOpenCL/2016-04-01-addrcast.cl
Index: t
yaxunl added a comment.
> Btw, there is another place in lib/CodeGen/CGExprScalar.cpp with
> CreateAddrSpaceCast call too. I am wondering if that could have the same
> issue... if yes, may be we should fix it already now.
I cannot find another CreateAddrSpaceCast in lib/CodeGen/CGExprScalar.cp
yaxunl marked an inline comment as done.
Comment at: test/CodeGenOpenCL/2016-04-01-addrcast.cl:1
@@ +1,2 @@
+// RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0 -cl-std=CL2.0
-emit-llvm -o - | FileCheck %s
+
Anastasia wrote:
> Can we rename the file to jus
yaxunl updated this revision to Diff 52607.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Removed 2016-04-01-addrcast.cl and it to address-spaces-conversions.cl.
http://reviews.llvm.org/D18713
Files:
lib/CodeGen/CGExprScalar.cpp
test/CodeGenOpenCL/address-spaces-conversio
yaxunl added a comment.
> If I check online I can still see it on line 1414:
> http://clang.llvm.org/doxygen/CGExprScalar_8cpp_source.html
This is the only place CreateAddrSpaceCast showing up and being fixed by this
patch.
http://reviews.llvm.org/D18713
__
yaxunl updated the summary for this revision.
yaxunl updated this revision to Diff 52800.
yaxunl added a comment.
Add more checks for w/o -ffake-address-space-map to the test.
http://reviews.llvm.org/D18713
Files:
lib/CodeGen/CGExprScalar.cpp
test/CodeGenOpenCL/address-spaces-conversions.cl
901 - 1000 of 1679 matches
Mail list logo