This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, openacc, og7, committed] Make reduction copy clauses 'private'


As we discussed, we are to support a behavior where within individual gangs,
worker/vector level reductions will correctly work with results immediately available.
This is on top of the implicit 'copy' clause added when we have loop reductions.

This patch adds a capability to mark map clauses additionally as 'private' (we may
be overloading this word a little too much :P), such that within offloaded regions
and wrt to our reduction lowering, the variable is (first)private, with additional
copy back appended at end of the offloaded region.

Care is taken to make sure this behavior is not applied when potential loop gang
reductions may happen (which this will not work).  In other cases, for gang-redundant
code, supposedly the multiple copy backs should all be the same, so the behavior
is same.

This is sort of a refinement of the implicit copy clause for reductions in PR70895.
A libgomp testcase is added to test the multiple worker-level reduction result case
across multiple gangs. Patch was tested and pushed to openacc-gcc-7-branch.

Chung-Lin

Attachment: 0001-Add-support-for-making-maps-private-inside-offloaded.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]