[Openmp-commits] [PATCH] D77603: [OpenMP] Sync writes to child thread's data before reduction

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Apr 13 13:40:41 PDT 2020


AndreyChurbanov added a comment.

In D77603#1978289 <https://reviews.llvm.org/D77603#1978289>, @bryanpkc wrote:

> Should I also add memory barriers to `__kmp_linear_barrier_gather_template`, `__kmp_tree_barrier_gather`, and `__kmp_hierarchical_barrier_gather`? They seem to suffer from the same problem on systems with weak memory order (but I don't have a handy test case to prove it).


Yes, ideally barriers of all types should have these extra synchronizations, though with lesser priority I think.  Because other barriers do not work by default, they need to be explicitly requested.  So it might be done in a separate patch. Or this patch can be extended, not sure what is better.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77603/new/

https://reviews.llvm.org/D77603





More information about the Openmp-commits mailing list