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
Just my two cents. Let's consider a simple example: for (int I = 0; I < 2; I++) { A = Compute(); barrier(); Use(A); } This does not mean Compute() needs to be executed for all the loop iterations before barrier() being executed. This only means that during each loop iteration, Compute()

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