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: 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 >

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] 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] 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] 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-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

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-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-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] 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-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.

[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

[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.

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] 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] 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

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-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

[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] 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,

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

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:

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-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] 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] 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

<    1   2