[openacc] add support for common block data
Cesar Philippidis
cesar@codesourcery.com
Mon Nov 7 23:30:00 GMT 2016
This patch adds support for variables inside common blocks in OpenACC
data clauses. The fortran FE changes are fairly straightforward.
gfc_match_omp_variable_list already has support for common block data,
so all I had to do was teach gfc_match_omp_map_clause to accept common
common block arguments.
The gimplifier changes are more interesting. Originally, the gimplifier
wants to treat the common block and it's members separately and that
resulted in duplicate data mapping errors at runtime. This patch gets
around that problem by teaching omp_notice_variable to ignore the common
block itself, at least in OpenACC contexts. That ensures that only the
common block members get data clauses. The problem here is that OpenACC
permits the user to transfer individual common block members, so that's
why I ended up this approach, otherwise it would have been easier to
transfer the common block as a whole.
This patch has been in gomp-4_0-branch for over a month, you can find
the original patch here
<https://gcc.gnu.org/ml/gcc-patches/2016-09/msg00950.html>.
Is this patch ok for trunk?
Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trunk-common-block.diff
Type: text/x-patch
Size: 21348 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20161107/8527b2ee/attachment.bin>
More information about the Fortran
mailing list