]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp, fortran: Add support for non-constant iterator bounds in Fortran deep-mapping...
authorKwok Cheung Yeung <kcyeung@baylibre.com>
Mon, 17 Feb 2025 22:00:28 +0000 (22:00 +0000)
committerKwok Cheung Yeung <kcyeung@baylibre.com>
Thu, 17 Apr 2025 22:33:43 +0000 (23:33 +0100)
commitd28dcc50cebc6dc7e751b29352da28718de80036
treea98a255ca48404cbdcc5cda901f42d339cf25fad
parentae60c1e09fe11c7b9e33478d016ca5c6251884d2
openmp, fortran: Add support for non-constant iterator bounds in Fortran deep-mapping iterator support

gcc/fortran/

* trans-openmp.cc (gfc_omp_deep_mapping_map): Add new argument for
vector of newly created iterators.  Push new iterators onto the
vector.
(gfc_omp_deep_mapping_comps): Add new argument for vector of new
iterators.  Pass argument in calls to gfc_omp_deep_mapping_item and
gfc_omp_deep_mapping_comps.
(gfc_omp_deep_mapping_item): Add new argument for vector of new
iterators.  Pass argument in calls to gfc_omp_deep_mapping_map and
gfc_omp_deep_mapping_comps.
(gfc_omp_deep_mapping_do): Add new argument for vector of new
iterators.  Pass argument in calls to gfc_omp_deep_mapping_item.
(gfc_omp_deep_mapping_cnt): Pass NULL to new argument for
gfc_omp_deep_mapping_do.
(gfc_omp_deep_mapping): Add new argument for vector of new
iterators.  Pass argument in calls to gfc_omp_deep_mapping_do.
* trans.h (gfc_omp_deep_mapping): Add new argument.

gcc/

* langhooks-def.h (lhd_omp_deep_mapping): Add new argument.
* langhooks.cc (lhd_omp_deep_mapping): Likewise.
* langhooks.h (omp_deep_mapping): Likewise.
* omp-low.cc (allocate_omp_iterator_elems): Work on the supplied
iterator set instead of the iterators in a supplied set of clauses.
(free_omp_iterator_elems): Likewise.
(lower_omp_target): Maintain vector of new iterators generated by
deep-mapping.  Allocate and free iterator element arrays using
iterators found in clauses and in the new iterator vector.

libgomp/

* testsuite/libgomp.fortran/allocatable-comp-iterators.f90: Add test
for non-const iterator boundaries.
gcc/ChangeLog.omp
gcc/fortran/ChangeLog.omp
gcc/fortran/trans-openmp.cc
gcc/fortran/trans.h
gcc/langhooks-def.h
gcc/langhooks.cc
gcc/langhooks.h
gcc/omp-low.cc
libgomp/ChangeLog.omp
libgomp/testsuite/libgomp.fortran/allocatable-comp-iterators.f90