openacc reference reductions

Cesar Philippidis cesar@codesourcery.com
Tue Feb 9 15:14:00 GMT 2016


This patch teaches omp-lower how handle reference-typed reductions,
which are common in fortran subroutines. Unlike the implementation in
gomp4 branch, this patch doesn't rewrite the reference reduction
variables as local variables. Instead, a local copy is created for
reduction variable.

There are two things that stick out in this patch. First, I took care
not remap any reduction variable appearing on a parallel directive
inside an offloaded region in order to keep it private. Second, you'll
notice that I'm creating quite a few temporary pointers inside
lower_oacc_reductions. Without those separate pointers, I'd get SSA
validation errors because those pointers get deferenced multiple times.
I didn't investigate that problem further.

Is this patch ok for trunk?

Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trunk-reductions-20160208.diff
Type: text/x-patch
Size: 133115 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160209/386d1acc/attachment.bin>


More information about the Gcc-patches mailing list