[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-11-01 Thread Yaxun Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285725: [OpenCL] Mark group functions as convergent in opencl-c.h (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D25343?vs=75203&id=76612#toc Repository: rL LLVM https://rev

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-31 Thread Yaxun Liu via cfe-commits
yaxunl added inline comments. Comment at: test/CodeGenOpenCL/convergent.cl:54 +// CHECK: tail call spir_func void @f() +// CHECK-NOT: call spir_func void @non_convfun() +// CHECK-NOT: call spir_func void @g() Anastasia wrote: > Did you mean to check @convfun() he

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-31 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Additional discussions: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20161024/175373.html https://reviews.llvm.org/D25343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-31 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Thanks! Could you please address the last comment before committing? Comment at: test/CodeGenOpenCL/convergent.cl:54 +// CHECK: tail call spir_func void @f() +// CHECK-NOT: call spir_func void @non_convfun() +//

RE: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-28 Thread Anastasia Stulova via cfe-commits
w; nd Subject: Re: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h Hello, > As far as I understand the whole problem is that the optimized functions are > marked by __attribute__((pure)). If the attribute is removed from your > example, we get LLVM dump preservi

Re: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-25 Thread Ettore Speziale via cfe-commits
Hello, > As far as I understand the whole problem is that the optimized functions are > marked by __attribute__((pure)). If the attribute is removed from your > example, we get LLVM dump preserving correctness: > > define i32 @bar(i32 %x) local_unnamed_addr #0 { > entry: > %call = tail call i3

RE: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-24 Thread Liu, Yaxun (Sam) via cfe-commits
ron.ball...@gmail.com Cc: Stellard, Thomas ; Arsenault, Matthew ; Sumner, Brian ; cfe-commits@lists.llvm.org Subject: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h Anastasia added a comment. In https://reviews.llvm.org/D25343#567374, @tstellarAMD wrote: > In https://revie

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-24 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D25343#567374, @tstellarAMD wrote: > In https://reviews.llvm.org/D25343#565288, @Anastasia wrote: > > > Do you have any code example where Clang/LLVM performs wrong optimizations > > with respect to the control flow of SPMD execution? > > >

RE: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-24 Thread Anastasia Stulova via cfe-commits
l.com; Clang Commits; Sumner, Brian; Stellard, Thomas; Arsenault, Matthew Subject: RE: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h + Tom Matt Thanks Ettore. I think OpenCL is subject to the same issue, and noduplicate does not help either. Basically if a funct

RE: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-20 Thread Liu, Yaxun (Sam) via cfe-commits
, Yaxun (Sam) Cc: Ettore Speziale ; alexey.ba...@intel.com; anastasia.stul...@arm.com; aaron.ball...@gmail.com; Clang Commits ; Sumner, Brian Subject: Re: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h Hello guys, >> Should we deprecate noduplicate then as conv

Re: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-20 Thread Ettore Speziale via cfe-commits
Hello guys, >> Should we deprecate noduplicate then as convergent should cover both use >> cases for OpenCL I believe? As far as I understand noduplicate was added >> specifically for SPMD use cases... > > noduplicate has different semantics than convergent. Although it is proposed > for SPMD

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-19 Thread Yaxun Liu via cfe-commits
yaxunl added a comment. > Should we deprecate noduplicate then as convergent should cover both use > cases for OpenCL I believe? As far as I understand noduplicate was added > specifically for SPMD use cases... noduplicate has different semantics than convergent. Although it is proposed for SP

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-19 Thread Yaxun Liu via cfe-commits
yaxunl updated this revision to Diff 75203. yaxunl marked 4 inline comments as done. yaxunl added a comment. Fix typo in test. https://reviews.llvm.org/D25343 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/CGCall.cpp lib/Headers/opencl-c.h lib/Sema/Sema

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-19 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D25343#567374, @tstellarAMD wrote: > In https://reviews.llvm.org/D25343#565288, @Anastasia wrote: > > > Do you have any code example where Clang/LLVM performs wrong optimizations > > with respect to the control flow of SPMD execution? > > >

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-13 Thread Yaxun Liu via cfe-commits
yaxunl updated this revision to Diff 74541. yaxunl added a comment. Minor revision by Aaron's comments. https://reviews.llvm.org/D25343 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/CGCall.cpp lib/Headers/opencl-c.h lib/Sema/SemaDeclAttr.cpp test/Cod

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-13 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Aside from some minor nits, the attribute functionality looks fine to me. As to whether we think this is a worthy attribute to add or not, I leave that to people who know CUDA an

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-13 Thread Yaxun Liu via cfe-commits
yaxunl updated this revision to Diff 74514. yaxunl marked 5 inline comments as done. yaxunl added a comment. Revised by Aaron's comments. Added a sema test. https://reviews.llvm.org/D25343 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/CGCall.cpp lib/Head

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-12 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/AttrDocs.td:612 + let Content = [{ +The ``convergent`` attribute can be placed on function declarations. It is +translated to LLVM ``convergent`` attribute, which indicates the call on a functi

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-12 Thread Yaxun Liu via cfe-commits
yaxunl retitled this revision from "[OpenCL] Mark group functions as noduplicate in opencl-c.h" to "[OpenCL] Mark group functions as convergent in opencl-c.h". yaxunl updated the summary for this revision. yaxunl added a reviewer: aaron.ballman. yaxunl updated this revision to Diff 74394. https: