[Openmp-commits] [PATCH] D40175: Fix for OMP doacross implementation on Power

Alexandre Eichenberger via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 22 08:06:20 PST 2017


AlexEichenberger accepted this revision.
AlexEichenberger added a comment.
This revision is now accepted and ready to land.

Changes are correct, a memory barrier is needed between allocating/reseting values to zero and publishing the pointer. That way, another thread see the published pointer only once all of the zeroing is complete.

In other places, an "instruction sync" might be sufficient, but the memory barrier is certainly fine too (though possibly a bit more expensive)


https://reviews.llvm.org/D40175





More information about the Openmp-commits mailing list