[PATCH, OpenACC] (1/2) Fix implicit mapping for array slices on lexically-enclosing data constructs (PR70828)
Julian Brown
julian@codesourcery.com
Sun Jun 9 17:36:00 GMT 2019
On Wed, 5 Dec 2018 21:10:45 +0000
Julian Brown <julian@codesourcery.com> wrote:
> Thanks for review! How's this version?
>
> I took the liberty of fixing the patch for Fortran array-descriptor
> mappings that use a PSET, also, and adding another test for that
> functionality.
This is a ping/new version of this patch, incorporating previous review
comments and also fixing the inheritance behaviour for references (e.g.
for array slices of Fortran function arguments). I've also merged the
two patches sent below into one:
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01790.html
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01791.html
The second part having been conditionally approved based on approval of
the first already, and rebased.
Re-tested with offloading to NVPTX. OK?
Thanks,
Julian
2019-06-09 Julian Brown <julian@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
gcc/
* gimplify.c (oacc_array_mapping_info): New struct.
(gimplify_omp_ctx): Add decl_data_clause hash map.
(new_omp_context): Zero-initialise above.
(delete_omp_context): Delete above if allocated.
(gimplify_scan_omp_clauses): Scan for array mappings on data
constructs, and record in above map.
(gomp_oacc_needs_data_present): New function.
(gimplify_adjust_omp_clauses_1): Handle data mappings (e.g.
array slices) declared in lexically-enclosing data constructs.
* omp-low.c (lower_omp_target): Allow decl for bias not to be
present in OpenACC context.
gcc/fortran/
* trans-openmp.c (gfc_omp_finish_clause): Don't raise error for
assumed-size array if present in a lexically-enclosing data
construct.
(gfc_omp_finish_clause): Guard addition of clauses for pointers
with DECL_P.
gcc/testsuite/
* c-c++-common/goacc/acc-data-chain.c: New test.
* gfortran.dg/goacc/pr70828.f90: New test.
* gfortran.dg/goacc/pr70828-2.f90: New test.
libgomp/
* testsuite/libgomp.oacc-c-c++-common/pr70828.c: New test.
* testsuite/libgomp.oacc-fortran/implicit_copy.f90: New test.
* testsuite/libgomp.oacc-fortran/pr70828.f90: New test.
* testsuite/libgomp.oacc-fortran/pr70828-2.f90: New test.
* testsuite/libgomp.oacc-fortran/pr70828-3.f90: New test.
* testsuite/libgomp.oacc-fortran/pr70828-4.f90: New test.
* testsuite/libgomp.oacc-fortran/pr70828-5.f90: New test.
* testsuite/libgomp.oacc-fortran/pr70828-6.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: data-construct-array-section-inheritance-2.diff
Type: text/x-patch
Size: 22424 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190609/8718e676/attachment.bin>
More information about the Fortran
mailing list