amdgcn: rewrite barrier() using fence and clang __builtin_amdgcn_s_barrier
authorJan Vesely <jan.vesely@rutgers.edu>
Wed, 16 Aug 2017 17:09:00 +0000 (17:09 +0000)
committerJan Vesely <jan.vesely@rutgers.edu>
Wed, 16 Aug 2017 17:09:00 +0000 (17:09 +0000)
commit999b1d942627537be989a53748b61b49a1d59a24
treefa3ab16955f85f5135b17a8bce01f62d8bac0c34
parent1977092dc3a22b0814314f6a14ba8056462318ee
amdgcn: rewrite barrier() using fence and clang __builtin_amdgcn_s_barrier

Specs require using fences when barrier() is invoked:
"The barrier function will either flush any variables stored in local memory
or queue a memory fence to ensure correct ordering of memory operations to local memory."
and
"The barrier function will queue a memory fence to ensure correct ordering
of memory operations to global memory."

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
Tested-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 311022
libclc/amdgcn/lib/SOURCES
libclc/amdgcn/lib/synchronization/barrier.cl [new file with mode: 0644]
libclc/amdgcn/lib/synchronization/barrier_impl.ll [deleted file]