Re: [PATCH] D14441: [OpenCL] Pipe types support.

2015-11-11 Thread Xiuli PAN via cfe-commits
pxli168 added a subscriber: pxli168. Comment at: test/CodeGenOpenCL/pipe_types.cl:5 @@ +4,3 @@ + +void test1(read_only pipe int p) { +// CHECK: define void @test1(%opencl.pipe_t* %p) Great work!! But I have tried your patch and find it does not support opencl

Re: [PATCH] D14441: [OpenCL] Pipe types support.

2015-11-13 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. F1095908: pipelog.txt This is the log of runing clang -cc1 -emit-llvm -cl-std=CL2.0 -o - pipe_types.c Comment at: test/CodeGenOpenCL/pipe_types.cl:7 @@ +6,3 @@ + +void test1(read_only pipe int p) { +// CHECK: define

Re: [PATCH] D15603: [OpenCL] Pipe type support

2015-12-17 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 43121. pxli168 added a comment. Apply comment form http://reviews.llvm.org/D14441. http://reviews.llvm.org/D15603 Files: include/clang/AST/ASTContext.h include/clang/AST/RecursiveASTVisitor.h include/clang/AST/Type.h include/clang/AST/TypeLoc.h

Re: [PATCH] D15603: [OpenCL] Pipe type support

2015-12-17 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: include/clang/AST/Type.h:5020 @@ +5019,3 @@ +/// PipeType - OpenCL20. +/// +class PipeType : public Type, public llvm::FoldingSetNode { bader wrote: > Xuili, could you apply the comments left by Pekka and Anastasia for

Re: [PATCH] D14441: [OpenCL] Pipe types support.

2015-12-15 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. Hi all, Bader had asked me to help him finished the patch set supporting the OpenCL2.0. His original work is based on llvm 3.6.2, and include almost everything needed for 2.0. Now I am working on the rest of the pipe support, include the full support to complex types

Re: [PATCH] D15603: [OpenCL] Pipe type support

2016-01-04 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/AST/ASTContext.cpp:3121 @@ +3120,3 @@ +QualType ASTContext::getPipeType(QualType T) const { + // Unique pointers, to guarantee there is only one pointer of a particular + // structure. Anastasia wrote: > Could we

[PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-05 Thread Xiuli PAN via cfe-commits
pxli168 created this revision. pxli168 added reviewers: pekka.jaaskelainen, Anastasia. pxli168 added subscribers: cfe-commits, bader. Support for the pipe built-in functions. The pipe packet type can be user defined structure, we need to handle this in clang frontend. This version is based on

Re: [PATCH] D13280: [OpenCL] Adding reserved operator logical xor for OpenCL

2016-01-08 Thread Xiuli PAN via cfe-commits
pxli168 added a subscriber: pxli168. pxli168 accepted this revision. pxli168 added a reviewer: pxli168. pxli168 added a comment. LGTM! http://reviews.llvm.org/D13280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-07 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 44312. pxli168 added a comment. 1. Refine the def of BUILTIN with LANGBUITIN with new OCLC_LANG 2. Remove mangler for the hard coded builtin function name 3. Fix some bugs. http://reviews.llvm.org/D15914 Files: include/clang/Basic/Builtins.def

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-07 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. So here is the summary about the inline comments: 1. What kind of prototype should codegen output for these functions? 2. What function names should these builtins have in llvm ir? 3. Access for pipe use image's for now, and will be refined. 4. What rules should we

r257254 - [OpenCL] Pipe type support

2016-01-09 Thread Xiuli Pan via cfe-commits
Author: pxl Date: Sat Jan 9 06:53:17 2016 New Revision: 257254 URL: http://llvm.org/viewvc/llvm-project?rev=257254=rev Log: [OpenCL] Pipe type support Summary: Support for OpenCL 2.0 pipe type. This is a bug-fix version for bader's patch reviews.llvm.org/D14441 Reviewers: pekka.jaaskelainen,

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-09 Thread Xiuli PAN via cfe-commits
pxli168 updated the summary for this revision. pxli168 updated this revision to Diff 44404. pxli168 added a comment. 1. Add tests for builtin function CodeGen and Semacheck 2. Add TODO for what we need to do about access qualifier 3. Fix some bugs found in writing Hope we cans squeeze these

Re: [PATCH] D15603: [OpenCL] Pipe type support

2016-01-05 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:108 @@ +107,3 @@ +PipeTy = llvm::PointerType::get(llvm::StructType::create( + CGM.getLLVMContext(), "opencl.pipe_t"), PipeAddrSpc); + } Anastasia wrote: > Yes, I think we might,

r257252 - Test Commit

2016-01-08 Thread Xiuli Pan via cfe-commits
Author: pxl Date: Sat Jan 9 01:12:32 2016 New Revision: 257252 URL: http://llvm.org/viewvc/llvm-project?rev=257252=rev Log: Test Commit Fix a typo Modified: cfe/trunk/lib/AST/Type.cpp Modified: cfe/trunk/lib/AST/Type.cpp URL:

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-09 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: include/clang/Basic/Builtins.def:1260 @@ +1259,3 @@ + +LANGBUILTIN(reserve_read_pipe, "i.", "tn", OCLC_LANG) +LANGBUILTIN(reserve_write_pipe, "i.", "tn", OCLC_LANG) Anastasia wrote: > That's right! I am just saying that

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-09 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. Then maybe I should hurry up to see if I can finish the Semacheck and this patch in time. By the way, I just got the access to the llvm svn, can I just commit the pipe type patch directly as I see you all accepted it. Or I should send it to the cfe-commit first?

Re: [PATCH] D15603: [OpenCL] Pipe type support

2015-12-25 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:108 @@ +107,3 @@ +PipeTy = llvm::PointerType::get(llvm::StructType::create( + CGM.getLLVMContext(), "opencl.pipe_t"), PipeAddrSpc); + } Anastasia wrote: > Should there be any

Re: [PATCH] D15603: [OpenCL] Pipe type support

2015-12-25 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 43622. pxli168 added a comment. Fix some typo and remove unnecessary namespace, and add a new test case. The Diff 43621 was on a wrong base, ignore it. http://reviews.llvm.org/D15603 Files: include/clang/AST/ASTContext.h

Re: [PATCH] D15603: [OpenCL] Pipe type support

2015-12-25 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 43621. pxli168 added a comment. Fixed the typo and remove unnecessary namespace. Also add a new test case. http://reviews.llvm.org/D15603 Files: include/clang/AST/ASTContext.h include/clang/AST/RecursiveASTVisitor.h include/clang/AST/Type.h

Re: [PATCH] D15603: [OpenCL] Pipe type support

2015-12-28 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:108 @@ +107,3 @@ +PipeTy = llvm::PointerType::get(llvm::StructType::create( + CGM.getLLVMContext(), "opencl.pipe_t"), PipeAddrSpc); + } pekka.jaaskelainen wrote: > I'm not sure

Re: [PATCH] D15603: [OpenCL] Pipe type support

2015-12-28 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:108 @@ +107,3 @@ +PipeTy = llvm::PointerType::get(llvm::StructType::create( + CGM.getLLVMContext(), "opencl.pipe_t"), PipeAddrSpc); + } pekka.jaaskelainen wrote: > pxli168 wrote:

[PATCH] D16047: [OpenCL] Add Sema checks for OpenCL 2.0

2016-01-11 Thread Xiuli PAN via cfe-commits
pxli168 created this revision. pxli168 added reviewers: Anastasia, pekka.jaaskelainen. pxli168 added subscribers: bader, cfe-commits. Add Sema checks for opencl 2.0 new features: Block, pipe, atomic etc. Also fix some old Sema check like pointer to image. This patch is based on bader's patch in

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-01-11 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:4934 @@ +4933,3 @@ +const Type *DeclTy = PDecl->getType().getCanonicalType().getTypePtr(); +if (AccessAttr->isReadWrite()) { + if (DeclTy->isPipeType() || Anastasia wrote: > In the

Re: [PATCH] D16047: [OpenCL] Add Sema checks for OpenCL 2.0

2016-01-11 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5733 @@ +5732,3 @@ + +#if 0 + pekka.jaaskelainen wrote: > Is this intentionally included in the patch? My mistake, just want to check if this works. But find it is handled by something else.

Re: [PATCH] D16047: [OpenCL] Add Sema checks for OpenCL 2.0

2016-01-11 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 44599. pxli168 added a comment. Remove some unused codes and add inline comment. http://reviews.llvm.org/D16047 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaInit.cpp

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-11 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: include/clang/Basic/Builtins.def:1260 @@ +1259,3 @@ + +LANGBUILTIN(reserve_read_pipe, "i.", "tn", OCLC_LANG) +LANGBUILTIN(reserve_write_pipe, "i.", "tn", OCLC_LANG) Anastasia wrote: > Ok, this way it means variable

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-11 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 44601. pxli168 added a comment. Add negative tests to hint all paths in the Semacheck. http://reviews.llvm.org/D15914 Files: include/clang/Basic/Builtins.def include/clang/Basic/Builtins.h include/clang/Basic/DiagnosticSemaKinds.td

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-01-11 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 44600. pxli168 added a comment. Fix destruct problem and fix style in inline comment. http://reviews.llvm.org/D16040 Files: include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CodeGenFunction.cpp

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-12 Thread Xiuli PAN via cfe-commits
pxli168 marked 4 inline comments as done. Comment at: include/clang/Basic/Builtins.def:1255 @@ -1254,1 +1254,3 @@ +// OpenCL v2.0 s6.13.16, s9.17.3.5 -- Pipe functions. +// We need the generic prototype, since the packet type could be anything. Anastasia wrote:

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-12 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 44624. pxli168 added a comment. Rewrite some comment. Can this patch be in llvm3.8 release if it is commited after 13th Jan? http://reviews.llvm.org/D15914 Files: include/clang/Basic/Builtins.def include/clang/Basic/Builtins.h

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-12 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: include/clang/Basic/Builtins.h:39 @@ -38,2 +38,3 @@ MS_LANG = 0x10, // builtin requires MS mode. + OCLC_LANG = 0x20,// builtin for OpenCL C only. ALL_LANGUAGES = C_LANG | CXX_LANG | OBJC_LANG, // builtin for all languages.

r271975 - Revert "[OPENCL] Fix wrongly vla error for OpenCL array."

2016-06-06 Thread Xiuli Pan via cfe-commits
Author: pxl Date: Mon Jun 6 22:41:07 2016 New Revision: 271975 URL: http://llvm.org/viewvc/llvm-project?rev=271975=rev Log: Revert "[OPENCL] Fix wrongly vla error for OpenCL array." Test case break on system-z. This reverts commit 9a7212e1e87f1396952d74f8c62314a775ccbb1c. Removed:

r271978 - [OPENCL] Fix wrongly vla error for OpenCL array.

2016-06-06 Thread Xiuli Pan via cfe-commits
Author: pxl Date: Mon Jun 6 23:34:00 2016 New Revision: 271978 URL: http://llvm.org/viewvc/llvm-project?rev=271978=rev Log: [OPENCL] Fix wrongly vla error for OpenCL array. Summary: OpenCL should support array with const value size length, those const varibale in global and constant address

r271971 - [OPENCL] Fix wrongly vla error for OpenCL array.

2016-06-06 Thread Xiuli Pan via cfe-commits
Author: pxl Date: Mon Jun 6 22:13:39 2016 New Revision: 271971 URL: http://llvm.org/viewvc/llvm-project?rev=271971=rev Log: [OPENCL] Fix wrongly vla error for OpenCL array. Summary: OpenCL should support array with const value size length, those const varibale in global and constant address

Re: [PATCH] D20133: [OpenCL] Fix __builtin_astype for vec3 types.

2016-06-11 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. I was on a vecation. LGTM, thanks! Repository: rL LLVM http://reviews.llvm.org/D20133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20090: [OPENCL] Fix wrongly vla error for OpenCL array.

2016-05-26 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/Sema/SemaType.cpp:2055 @@ -2054,3 +2054,3 @@ - return S.VerifyIntegerConstantExpression(ArraySize, , Diagnoser, - S.LangOpts.GNUMode).isInvalid(); + return S +

Re: [PATCH] D20444: [OpenCL] Include opencl-c.h by default as a clang module

2016-05-29 Thread Xiuli PAN via cfe-commits
pxli168 accepted this revision. pxli168 added a comment. This revision is now accepted and ready to land. LGTM! Thanks! http://reviews.llvm.org/D20444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D20090: [OPENCL] Fix wrongly vla error for OpenCL array.

2016-05-29 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 58932. pxli168 added a comment. Make all tests in OpenCL 2.0. http://reviews.llvm.org/D20090 Files: lib/AST/ExprConstant.cpp lib/Sema/SemaType.cpp test/CodeGenOpenCL/vla.cl Index: test/CodeGenOpenCL/vla.cl

[PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-01-10 Thread Xiuli PAN via cfe-commits
pxli168 created this revision. pxli168 added reviewers: Anastasia, pekka.jaaskelainen. pxli168 added a subscriber: cfe-commits. OpenCL access qualifiers are now not only used for image types, refine it to avoid misleading, Add semacheck for OpenCL access qualifier as well as test caees.

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-14 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 44881. pxli168 added a comment. Add prefix "__" to CodeGen builtin function name. http://reviews.llvm.org/D15914 Files: include/clang/Basic/Builtins.def include/clang/Basic/Builtins.h include/clang/Basic/DiagnosticSemaKinds.td

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-13 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 44826. pxli168 added a comment. Fix format of diag err string, remove useless ':' after expecting. http://reviews.llvm.org/D15914 Files: include/clang/Basic/Builtins.def include/clang/Basic/Builtins.h include/clang/Basic/DiagnosticSemaKinds.td

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-14 Thread Xiuli PAN via cfe-commits
pxli168 marked 2 inline comments as done. Comment at: lib/Sema/SemaChecking.cpp:378 @@ +377,3 @@ + } + + return false; Anastasia wrote: > I am asking about setArg and not setType! Oh, I just mistook your meaning. It seems we don't need that as we have to

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-14 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 44965. pxli168 added a comment. Forget about get_pipe_num/max_packets builtin. http://reviews.llvm.org/D15914 Files: include/clang/Basic/Builtins.def include/clang/Basic/Builtins.h include/clang/Basic/DiagnosticSemaKinds.td lib/Basic/Builtins.cpp

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-19 Thread Xiuli PAN via cfe-commits
pxli168 updated the summary for this revision. pxli168 updated this revision to Diff 45234. pxli168 marked 9 inline comments as done. pxli168 added a comment. Fix some small comments problems. http://reviews.llvm.org/D15914 Files: include/clang/Basic/Builtins.def

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-19 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1974 @@ +1973,3 @@ +// Type of the generic packet parameter. +unsigned GenericAS = +getContext().getTargetAddressSpace(LangAS::opencl_generic); Good idea! This can fit different

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-14 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. I think we'd better to ask about to add this in. The pipe type support actually have no use without builtins to read or write it. Comment at: lib/CodeGen/CGBuiltin.cpp:1981 @@ +1980,3 @@ + const char *Name = + (BuiltinID ==

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-02-10 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 47455. pxli168 marked 5 inline comments as done. http://reviews.llvm.org/D16040 Files: include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CodeGenFunction.cpp lib/Sema/SemaChecking.cpp lib/Sema/SemaDeclAttr.cpp

Re: [PATCH] D16876: [OpenCL] Refine pipe builtin support

2016-02-04 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 46991. http://reviews.llvm.org/D16876 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaChecking.cpp test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl Index: test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl

Re: [PATCH] D16876: [OpenCL] Refine pipe builtin support

2016-02-04 Thread Xiuli PAN via cfe-commits
pxli168 requested a review of this revision. 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 // functions have following forms. yaxunl wrote: >

Re: [PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-04 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. Hi Pekka/Anastasia, I find that most of the attribute parses was done in ParseDecl.cpp, should this also be in there? Thanks Xiuli Comment at: lib/Parse/ParseStmt.cpp:2214 @@ +2213,3 @@ + +bool Parser::ParseOpenCLUnrollHintAttribute(ParsedAttributes

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-02-04 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. Hi Anastasia/Pekka, https://www.khronos.org/bugzilla/show_bug.cgi?id=1459 Bug report has been sent. Thanks Xiuli http://reviews.llvm.org/D15914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D16876: [OpenCL] Refine pipe builtin support

2016-02-04 Thread Xiuli PAN via cfe-commits
pxli168 created this revision. pxli168 added reviewers: Anastasia, pekka.jaaskelainen, yaxunl. pxli168 added a subscriber: cfe-commits. Refine the type builtin support as the request with http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160201/148637.html http://reviews.llvm.org/D16876

RE: r258782 - Recommit: R258773 [OpenCL] Pipe builtin functions

2016-02-04 Thread xiuli pan via cfe-commits
The refined patch is in http://reviews.llvm.org/D16876 -Original Message- From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of xiuli pan via cfe-commits Sent: Tuesday, February 2, 2016 10:53 AM To: 'Richard Smith' <rich...@metafoo.co.uk> Cc: 'cfe-commits

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-05 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/Sema/SemaDecl.cpp:13011 @@ -12978,5 +13010,3 @@ - // OpenCL 1.2 spec, s6.9 r: - // The event type cannot be used to declare a structure or union field. - if (LangOpts.OpenCL && T->isEventT()) { -Diag(Loc,

Re: [PATCH] D16876: [OpenCL] Refine pipe builtin support

2016-02-05 Thread Xiuli PAN via cfe-commits
pxli168 requested a review of this revision. pxli168 added a reviewer: rsmith. pxli168 added a comment. Hi Richard/Anastasia, I replied in the commit email, and here are some explains: 1. Without the space after comma the "//" will be aligned. 2. We want generic prototypes of the builtin

Re: [PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-05 Thread Xiuli PAN via cfe-commits
pxli168 added a reviewer: rsmith. pxli168 added a comment. Hi richard, What is your opinion about where to put this ParseOpenCLUnrollHintAttribute? Thanks Xiuli Comment at: lib/Parse/ParseStmt.cpp:2214 @@ +2213,3 @@ + +bool

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-02-05 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 47073. pxli168 added a comment. Make some optimization http://reviews.llvm.org/D16040 Files: include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CodeGenFunction.cpp lib/Sema/SemaChecking.cpp

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-02-05 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5067 @@ +5066,3 @@ + if (DeclTy->isPipeType() || + (S.getLangOpts().OpenCLVersion < 200 && DeclTy->isImageType())) { +S.Diag(D->getLocation(), diag::err_opencl_invalid_read_write)

Re: [PATCH] D16047: [OpenCL] Add Sema checks for OpenCL 2.0

2016-02-05 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 47074. pxli168 updated the summary for this revision. pxli168 added a comment. Rebase for partition http://reviews.llvm.org/D16047 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaInit.cpp

RE: r258782 - Recommit: R258773 [OpenCL] Pipe builtin functions

2016-01-27 Thread xiuli pan via cfe-commits
Hi hans, Request to merge it to release 38 It adds Pipe BIFs to be used along with Pipe type committed earlier (in r257254). Thanks Xiuli -Original Message- From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of Xiuli Pan via cfe-commits Sent: Tuesday, January 26

Re: [PATCH] D16047: [OpenCL] Add Sema checks for OpenCL 2.0

2016-01-26 Thread Xiuli PAN via cfe-commits
pxli168 marked 6 inline comments as done. pxli168 added a comment. I will separate this patch into small ones. Comment at: lib/Sema/SemaDecl.cpp:5724 @@ +5723,3 @@ + R->isPipeType()) { +Diag(D.getIdentifierLoc(), +

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-01-26 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: test/Parser/opencl-image-access.cl:9 @@ -7,1 +8,3 @@ +#if CL20 __kernel void f__rw(__read_write image2d_t a) { } +#endif Anastasia wrote: > Btw, I can see that read_write is now accepted even if -cl-std=CL1.1. So >

Re: [PATCH] D16692: [OpenCL] Eliminate warning when declaring OpenCL builtin functions

2016-02-01 Thread Xiuli PAN via cfe-commits
pxli168 accepted this revision. pxli168 added a comment. Thanks, LGTM! http://reviews.llvm.org/D16692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

RE: r258782 - Recommit: R258773 [OpenCL] Pipe builtin functions

2016-02-01 Thread xiuli pan via cfe-commits
.llvm.org> Subject: Re: r258782 - Recommit: R258773 [OpenCL] Pipe builtin functions On Mon, Jan 25, 2016 at 8:03 PM, Xiuli Pan via cfe-commits <cfe-commits@lists.llvm.org> wrote: > Author: pxl > Date: Mon Jan 25 22:03:48 2016 > New Revision: 258782 > > URL: http://llvm.o

Re: [PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-01 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: test/SemaOpenCL/unroll-hint.cl:22 @@ +21,2 @@ +} +#endif It seems the negative integer invalid test is missing? I think it was in your last diff. http://reviews.llvm.org/D16686

Re: [PATCH] D16539: [FIX] 26194 - LLVM crash in CXXNameMangler::mangleType

2016-02-01 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: test/CodeGenOpenCL/generic_mangling.cl:1 @@ +1,2 @@ +// RUN: %clang_cc1 -ffake-address-space-map -emit-llvm -ffp-contract=off -x cl -cl-std=CL2.0 -o - %s | FileCheck %s + Is this enough for the new added

Re: [PATCH] D16692: [OpenCL] Eliminate warning when declaring OpenCL builtin functions

2016-02-03 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. I see you have committed this patch, you can try to follow the guide here: http://llvm.org/docs/Phabricator.html#committing-a-change To add something in your commit and then the system will automatic close the diff and have link to the commmit. This will help others to

Re: [PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-03 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/CodeGen/CGLoopInfo.cpp:131 @@ +130,3 @@ +// equivalent LoopHintAttr enums. +// See OpenCL v2.0 s6.11.5 for details. +// 0 corresponds to opencl_unroll_hint attribute without Can you also change this

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-02-03 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5067 @@ +5066,3 @@ + if (DeclTy->isPipeType() || + (S.getLangOpts().OpenCLVersion < 200 && DeclTy->isImageType())) { +S.Diag(D->getLocation(), diag::err_opencl_invalid_read_write)

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-02-03 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 46865. pxli168 added a comment. Remove repeat test case. http://reviews.llvm.org/D16040 Files: include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CodeGenFunction.cpp lib/Sema/SemaChecking.cpp

Re: [PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-02 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/Sema/SemaStmtAttr.cpp:208 @@ +207,3 @@ +SourceRange Range) { + assert(A.getKind() == AttributeList::AT_OpenCLUnrollHint); + This is also not necessary because this function can be

Re: [PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-02 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/Sema/SemaStmtAttr.cpp:216 @@ +215,3 @@ +S.Diag(A.getLoc(), diag::err_attribute_too_many_arguments) +<< "opencl_unroll_hint" << 1; +return nullptr; I think you should not use hard code here, just use

Re: [PATCH] D16692: [OpenCL] Eliminate warning when declaring OpenCL builtin functions

2016-01-28 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/Sema/SemaLookup.cpp:698 @@ +697,3 @@ +// tgmath.h, time.h, wchar.h and wctype.h are not available and cannot +// be included by a program. +if (S.getLangOpts().OpenCL && I think the > C99

Re: [PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-01-28 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: include/clang/Basic/DiagnosticParseKinds.td:906 @@ +905,3 @@ +def err_opencl_unroll_hint_on_non_loop : Error< + "OpenCL only supports opencl_unroll_hint on for, while, and do statements">; + you can change it to

Re: [PATCH] D17437: [OpenCL] Add Sema checks for types

2016-02-23 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 48872. pxli168 marked an inline comment as done. http://reviews.llvm.org/D17437 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaType.cpp test/CodeGenOpenCL/opencl_types.cl test/SemaOpenCL/invalid-image.cl

Re: [PATCH] D17438: [OpenCL] Add Sema checks for atomics and implicit declaration

2016-02-23 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. It now gives a warning for both C99 and OpenCL. But for target SPIR it gives an err only because it treat unprototyped function as varidic function: /// \brief Checks whether the given calling convention supports variadic /// calls. Unprototyped calls also use the

r261719 - [OpenCL] Add Sema checks for OpenCL 2.0 block

2016-02-23 Thread Xiuli Pan via cfe-commits
Author: pxl Date: Tue Feb 23 22:29:36 2016 New Revision: 261719 URL: http://llvm.org/viewvc/llvm-project?rev=261719=rev Log: [OpenCL] Add Sema checks for OpenCL 2.0 block Summary: Add Sema checks for opencl 2.0 new features: Block. This patch is partitioned from http://reviews.llvm.org/D16047

RE: r261719 - [OpenCL] Add Sema checks for OpenCL 2.0 block

2016-02-23 Thread xiuli pan via cfe-commits
Hi, Does anyone knows why the svn seems to be stuck after I commit this patch. Thanks Xiuli -Original Message- From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of Xiuli Pan via cfe-commits Sent: Wednesday, February 24, 2016 12:41 PM To: cfe-commits@lists.llvm.org

Re: [PATCH] D17412: PR19957: [OpenCL] incorrectly accepts implicit address space conversion with ternary operator

2016-02-25 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. 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, +

r261818 - [OpenCL] Add Sema checks for types

2016-02-24 Thread Xiuli Pan via cfe-commits
Author: pxl Date: Wed Feb 24 21:34:20 2016 New Revision: 261818 URL: http://llvm.org/viewvc/llvm-project?rev=261818=rev Log: [OpenCL] Add Sema checks for types Summary: Add Sema checks for opencl type: image, pipe This patch is partitioned from http://reviews.llvm.org/D16047 Reviewers:

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-02-24 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 49007. http://reviews.llvm.org/D16040 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CodeGenFunction.cpp lib/Parse/ParseDecl.cpp lib/Sema/SemaChecking.cpp

Re: [PATCH] D17578: [OpenCL]Allowing explicit conversion of "0" to event_t type

2016-02-24 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. foo((event_t)0); Is above use have been hint by some test cases? Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7679 @@ -7678,2 +7678,3 @@ def err_wrong_sampler_addressspace: Error< - "sampler type cannot be used with the __local and

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-02-24 Thread Xiuli PAN via cfe-commits
pxli168 marked 2 inline comments as done. pxli168 added a comment. Remove test case for access quilifier in test/SemaOpenCL/invalid-kernel-attrs.cl. Due to the patch http://reviews.llvm.org/D17437. read_only can only be used in parameters with pipe and image type. Comment at:

Re: [PATCH] D17578: [OpenCL]Allowing explicit conversion of "0" to event_t type

2016-02-25 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/Sema/SemaCast.cpp:2324-2326 @@ +2323,5 @@ +} else { +Self.Diag(OpRange.getBegin(), + diag::error_opencl_cast_non_zero_to_event_t) + << intValue.toString(10) <<

Re: [PATCH] D16876: [OpenCL] Refine pipe builtin support

2016-02-24 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 49008. pxli168 added a comment. 1. Make new indent and leave space for the incoming OpenCL C++. 2. Check for the index to see if they are integers. http://reviews.llvm.org/D16876 Files: include/clang/Basic/Builtins.h

Re: [PATCH] D17438: [OpenCL] Add Sema checks for atomics and implicit declaration

2016-02-25 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15603 Bug reported. http://reviews.llvm.org/D17438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17437: [OpenCL] Add Sema checks for types

2016-02-22 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 48773. pxli168 added a comment. Add array check for types. http://reviews.llvm.org/D17437 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaType.cpp test/CodeGenOpenCL/opencl_types.cl

Re: [PATCH] D17436: [OpenCL] Add Sema checks for OpenCL 2.0 block

2016-02-22 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/Sema/SemaDecl.cpp:6714 @@ +6713,3 @@ + if (LangOpts.OpenCLVersion >= 200 && T->isBlockPointerType()) { +const BlockPointerType *BlkTy = T->getAs(); +const FunctionProtoType *FTy = Anastasia wrote: > Yes, but

Re: [PATCH] D17436: [OpenCL] Add Sema checks for OpenCL 2.0 block

2016-02-22 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 48774. http://reviews.llvm.org/D17436 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaType.cpp test/SemaOpenCL/invalid-block.cl Index: test/SemaOpenCL/invalid-block.cl

Re: [PATCH] D17438: [OpenCL] Add Sema checks for atomics and implicit declaration

2016-02-22 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. It seems this patch is useless. The spec does not tell about implicit declaration of function, but now clang with -triple spir will output err if there is implicit declaration of function. I have read about spir and opencl spec but could not find anything talk about

Re: [PATCH] D16928: [OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0

2016-02-22 Thread Xiuli PAN via cfe-commits
pxli168 accepted this revision. pxli168 added a comment. This revision is now accepted and ready to land. Then there will be no problem. I will change my patches as well. LGTM! Thanks. http://reviews.llvm.org/D16928 ___ cfe-commits mailing list

r261961 - [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-02-25 Thread Xiuli Pan via cfe-commits
Author: pxl Date: Thu Feb 25 21:13:03 2016 New Revision: 261961 URL: http://llvm.org/viewvc/llvm-project?rev=261961=rev Log: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr Summary: OpenCL access qualifiers are now not only used for image types, refine it to avoid misleading, Add

Re: [PATCH] D17596: [OpenCL] Add ocl and spir version for spir target

2016-02-25 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 49136. http://reviews.llvm.org/D17596 Files: lib/CodeGen/TargetInfo.cpp test/CodeGenOpenCL/spir_version.cl Index: test/CodeGenOpenCL/spir_version.cl === --- /dev/null +++

Re: [PATCH] D17596: [OpenCL] Add ocl and spir version for spir target

2016-02-25 Thread Xiuli PAN via cfe-commits
pxli168 marked an inline comment as done. pxli168 added a comment. I think this is just a small change to help identify the which standard llvm-ir is using. And there is a SPIRV branch from Khronos https://github.com/KhronosGroup/SPIRV-LLVM We can start there and try to merge the spir-v support

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-24 Thread Xiuli PAN via cfe-commits
pxli168 added a comment. Hi pekka, What is your opinion about this patch? And how could we ask the release manager to squeeze this patch into LLVM release 3.8? The pipe in OpneCL can only be handled by builtin functions, and this patch is needed for the pipe support. Thanks Xiuli

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-19 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 45258. pxli168 added a comment. Remove some debug lines. http://reviews.llvm.org/D15914 Files: include/clang/Basic/Builtins.def include/clang/Basic/Builtins.h include/clang/Basic/DiagnosticSemaKinds.td lib/Basic/Builtins.cpp

r258773 - [OpenCL] Pipe builtin functions

2016-01-25 Thread Xiuli Pan via cfe-commits
Author: pxl Date: Mon Jan 25 20:06:04 2016 New Revision: 258773 URL: http://llvm.org/viewvc/llvm-project?rev=258773=rev Log: [OpenCL] Pipe builtin functions Summary: Support for the pipe built-in functions for OpenCL 2.0. The pipe builtin functions may have infinite kinds of element types, one

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-01-22 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 45681. pxli168 marked 4 inline comments as done. pxli168 added a comment. Rewrite some comments and add missing invalid test case. http://reviews.llvm.org/D16040 Files: include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-02-15 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 48046. pxli168 marked 3 inline comments as done. pxli168 added a comment. Update doc for OpenCL access qualifier, still find where to handle access qualifier for pipe type. http://reviews.llvm.org/D16040 Files: include/clang/Basic/Attr.td

Re: [PATCH] D16040: [OpenCL] Refine OpenCLImageAccessAttr to OpenCLAccessAttr

2016-02-15 Thread Xiuli PAN via cfe-commits
pxli168 requested a review of this revision. pxli168 added a comment. Need to refine access qualifier with pipe type. Comment at: lib/Sema/SemaDeclAttr.cpp:5052 @@ +5051,3 @@ + if (D->hasAttr()) { +S.Diag(D->getLocation(), diag::err_opencl_multiple_access_qualifiers) +

  1   2   >