This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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(-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]