[PATCH] D31731: [AMDGPU] Eliminate barrier if workgroup size is not greater than wavefront size

Tony Tye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 16:24:55 PDT 2017


t-tye added a comment.

In https://reviews.llvm.org/D31731#719633, @rampitec wrote:

> In https://reviews.llvm.org/D31731#719632, @arsenm wrote:
>
> > Should this replace it with a wave barrier instead of just deleting it?
>
>
> I do not see what can happen to convergence after lowering, but probably it is better to replace it with wave_barrier anyway. Will do.


I think the issue is that need to ensure there is no reordering of code before and after the barrier since other lanes may be reading those values. Also need to ensure that the basic block is not cloned as again that would change the cross lane semantics. Without the wave_barrier the compiler could make changes based on only considering the single lane execution semantics.


Repository:
  rL LLVM

https://reviews.llvm.org/D31731





More information about the llvm-commits mailing list