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

2016-02-19 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261350: [OpenCL] Generate metadata for opencl_unroll_hint attribute (authored by stulova). Changed prior to commit: http://reviews.llvm.org/D16686?vs=47716&id=48513#toc Repository: rL LLVM http://re

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

2016-02-17 Thread Xiuli PAN via cfe-commits
pxli168 accepted this revision. pxli168 added a comment. Sorry for the late reply, I was on a break. LGTM! http://reviews.llvm.org/D16686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

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

2016-02-17 Thread Yaxun Liu via cfe-commits
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

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

2016-02-16 Thread Pekka Jääskeläinen via cfe-commits
pekka.jaaskelainen accepted this revision. pekka.jaaskelainen added a comment. LGTM. http://reviews.llvm.org/D16686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-02-12 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. @Pekka, Xiuli, Richard, any more comments here? Thanks! http://reviews.llvm.org/D16686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-02-11 Thread Yaxun Liu via cfe-commits
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

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

2016-02-11 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Comment at: lib/CodeGen/CGLoopInfo.cpp:134 @@ +133,3 @@ +// 1 - disable unroll +// other positive integer n - unroll by n +if (OpenCLHint) { --

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

2016-02-10 Thread Yaxun Liu via cfe-commits
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

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

2016-02-10 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/unroll-hint-cl20.cl:1 @@ +1,2 @@ +//RUN: %clang_cc1 -O0 -cl-std=CL2.0 -fsyntax-only -verify %s + Could we just combine this with test/SemaOpenCL/unroll-hint.cl. You can have two RUN lines and pass somet

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

2016-02-09 Thread Yaxun Liu via cfe-commits
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

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

2016-02-09 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Parse/ParseStmt.cpp:2214 @@ +2213,3 @@ + +bool Parser::ParseOpenCLUnrollHintAttribute(ParsedAttributes &Attrs) { + MaybeParseGNUAttributes(Attrs); pxli168 wrote: > Anastasia wrote: > > pxli168 wrote: > > > I am won

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 Parser::ParseOpenCLUnrollHintAttribute(ParsedAttribut

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

2016-02-05 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Parse/ParseStmt.cpp:2214 @@ +2213,3 @@ + +bool Parser::ParseOpenCLUnrollHintAttribute(ParsedAttributes &Attrs) { + MaybeParseGNUAttributes(Attrs); pxli168 wrote: > I am wondering where should this function goes in,

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] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-04 Thread Yaxun Liu via cfe-commits
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

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 commen

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

2016-02-03 Thread Yaxun Liu via 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

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

2016-02-03 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaStmtAttr.cpp:230 @@ +229,3 @@ + << A.getName() << AANT_ArgumentIntegerConstant << E->getSourceRange(); + return 0; +} 0 -> nullptr http://reviews.llvm.org/D16686

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

2016-02-03 Thread Yaxun Liu via cfe-commits
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

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

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

2016-02-02 Thread Yaxun Liu via cfe-commits
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

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

2016-02-02 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaStmtAttr.cpp:225 @@ +224,3 @@ +Expr *E = A.getArgAsExpr(0); +assert(E != nullptr && "Invalid opencl_unroll_hint argument"); +llvm::APSInt ArgVal(32); pxli168 wrote: > Is this necessary as you ha

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-01 Thread Yaxun Liu via cfe-commits
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/

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] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute

2016-02-01 Thread Yaxun Liu via cfe-commits
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

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

2016-02-01 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Parse/Parser.h:2200 @@ -2199,1 +2199,3 @@ void ParseOpenCLQualifiers(ParsedAttributes &Attrs); + /// \brief Parses opencl_unroll_hint attribute if language is OpenCL 2.0+. + /// \return false if error happens. ---

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

2016-02-01 Thread Yaxun Liu via cfe-commits
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/

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

2016-01-29 Thread Yaxun Liu via cfe-commits
yaxunl updated this revision to Diff 46434. yaxunl marked 17 inline comments as done. yaxunl added a comment. Revised as Anastasia and Xiuli suggested. http://reviews.llvm.org/D16686 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticParseKind

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

2016-01-29 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/Attr.td:661 @@ +660,3 @@ + let Args = [UnsignedArgument<"UnrollHint">]; + let Documentation = [Undocumented]; +} I think undocumented is not allowed any longer. I suggest you to check OpenCLGeneri

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 opencl_u

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

2016-01-28 Thread Yaxun Liu via cfe-commits
yaxunl created this revision. yaxunl added reviewers: Anastasia, pxli168, pekka.jaaskelainen. yaxunl added subscribers: tstellarAMD, cfe-commits. Add codegen and diagnostics for opencl_unroll_hint attribute. The code is based on Khronos OpenCL compiler (https://github.com/KhronosGroup/SPIR/tree/