This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch, fortran] [00/21] Remove coarray support in the scalarizer
- From: Mikael Morin <mikael dot morin at sfr dot fr>
- To: gfortran <fortran at gcc dot gnu dot org> , GCC patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 16 Sep 2011 01:08:13 +0200 (CEST)
- Subject: [Patch, fortran] [00/21] Remove coarray support in the scalarizer
Hello,
the scalarizer is there to generate loops for assignments over more than
one element. Tobias extended it at various places to support coarrays,
but this should not be necessary as coarrays in assignments either refer
to the array present on the local image or to the one on the remote image
(in which case a local temporary is created). In either case the coarray
is seen as a normal array by the assignment code, which makes the point
of having coarray-specific handling in the scalarizer moot.
In fact the reason for the presence of coarrays in the scalarizer is that
gfc_conv_expr_descriptor uses the scalarizer to setup array (co)bounds.
This patch serie removes the coarray-specific code in the scalarizer, and
replaces it with some additional cobound setup code in gfc_conv_expr_descriptor.
It is supposed to make the code easier to grasp by having a scalarizer free of
coarray stuff (it is complicated enough without it), and by having cobound
setup code gathered in a single place.
The downside is that it makes gfc_conv_expr_descriptor even bigger than it was
already.
Every patch has been tested by incremental bootstrap and running the fortran
testsuite with RUNTESTLAGS=caf.exp and RUNTESTFLAGS="dg.exp=*coarray*".
The last one has also passed a full fortran regression test.
OK for trunk?
Mikael
patchset layout:
- patches 1..4:
Preliminary cleanups.
Those are quite independant on the rest.
Patch 4 is optional.
- patches 5..13:
Step by step move from scalarizer-provided cobounds setup code
to explicit specific code in gfc_conv_expr_descriptor.
Patch 6 is a request for explaination and is not intended for check-in.
- patch 14:
Fixes a regression.
- patches 15..21:
This is the point of all the rest: remove coarray-specific code in the
scalarizer.
check.c | 34 +-------
expr.c | 6 ++
resolve.c | 35 ++++++--
trans-array.c | 248 +++++++++++++++++++++++------------------------------
trans-expr.c | 6 +-
trans-intrinsic.c | 52 +++++++-----
trans.h | 8 +-
7 files changed, 180 insertions(+), 209 deletions(-)
- Follow-Ups:
- [Patch, fortran] [01/21] Remove coarray support in the scalarizer: Remove is_coarray
- [Patch, fortran] [02/21] Remove coarray support in the scalarizer: Move coarray resolution code around
- [Patch, fortran] [03/21] Remove coarray support in the scalarizer: Simplify coarray descriptor setup.
- [Patch, fortran] [11/21] Remove coarray support in the scalarizer: Support 0-rank loop in gfc_conv_ss_startstride
- [Patch, fortran] [15/21] Remove coarray support in the scalarizer: Remove gfc_ss::data::temp_ss::codimen field
- [Patch, fortran] [14/21] Remove coarray support in the scalarizer: Fix full array dimension type
- [Patch, fortran] [18/21] Remove coarray support in the scalarizer: Cleanup gfc_walk_variable_expr
- [Patch, fortran] [10/21] Remove coarray support in the scalarizer: Factor bound evaluation
- [Patch, fortran] [19/21] Remove coarray support in the scalarizer: Remove coarray_last argument
- [Patch, fortran] [21/21] Remove coarray support in the scalarizer: Final cleanup
- [Patch, fortran] [17/21] Remove coarray support in the scalarizer: Remove gfc_ss::dimen field
- [Patch, fortran] [20/21] Remove coarray support in the scalarizer: Remove coarray argument
- [Patch, fortran] [16/21] Remove coarray support in the scalarizer: Remove gfc_loopinfo::codimen
- [Patch, fortran] [13/21] Remove coarray support in the scalarizer: Add specific walk_coarray function.
- [Patch, fortran] [12/21] Remove coarray support in the scalarizer: Get cobounds without the scalarizer
- [Patch, fortran] [09/21] Remove coarray support in the scalarizer: Accept coarray dimensions in gfc_conv_section_startstride
- [Patch, fortran] [08/21] Remove coarray support in the scalarizer: Factor array ref references
- [Patch, fortran] [07/21] Remove coarray support in the scalarizer: Use codim as argument gfc_get_array_type_bounds
- [Patch, fortran] [05/21] Remove coarray support in the scalarizer: Calculate codim earlier.
- [Patch, fortran] [04/21] Remove coarray support in the scalarizer: Fix gfc_get_corank
- [Patch, fortran] [06/21] Remove coarray support in the scalarizer: Request coarray for an actual arg associed with a coarray dummy
- Re: [Patch, fortran] [00/21] Remove coarray support in the scalarizer
- Re: [Patch, fortran] [00/21] Remove coarray support in the scalarizer