[Openmp-commits] [PATCH] D40171: Fix for OMP doacross implementation on 32-bit platforms
Andrey Churbanov via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Nov 20 07:56:20 PST 2017
AndreyChurbanov added a comment.
In https://reviews.llvm.org/D40171#928510, @Hahnfeld wrote:
> Do we need all `volatile` casts that force the different code paths for 32 and 64 bit? In my experiments on Power it worked without them...
Forgot to answer this point. The second cast to volatile (in while statement) used to force the compiler to re-read the value of doacross_flags pointer at each iteration. The first cast (in CAS statement) just repeats the same cast encoded into the macros. So it is not technically necessary, but used here just in case we may some time decide to change the macros, and then this cast will work.
Repository:
rL LLVM
https://reviews.llvm.org/D40171
More information about the Openmp-commits
mailing list