[og7] Privatize independent OpenACC reductions

Cesar Philippidis cesar@codesourcery.com
Fri Jan 26 17:09:00 GMT 2018


I've applied this patch to openacc-gcc-7-branch which privatizes
reduction variables inside independent loops which are guaranteed to be
assigned worker or vector partitioning during oaccdevlow. Without this
patch, the inner-reduction.c test case would generate bogus results.
This patch is an extension of Chung-Lin's patch posted here
<https://gcc.gnu.org/ml/gcc-patches/2017-09/msg00274.html>.

The next step going forward is to teach the gimplifier to mark those
reduction variables are implicitly firstprivate, instead of
copy+private. Some members in the OpenACC technical committee argue that
the reduction variable in inner-reduction.c should be firstprivate, not
copy.

Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: og7-private-reduction.diff
Type: text/x-patch
Size: 2451 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180126/a0e5dab1/attachment.bin>


More information about the Gcc-patches mailing list