This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: fortran/27662: Transpose doesn't work on function return
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Thomas Koenig <Thomas dot Koenig at online dot de>, Steve Kargl <sgk at troutmask dot apl dot washington dot edu>, "H. J. Lu" <hjl at lucon dot org>, fortran at gcc dot gnu dot org, richard at codesourcery dot com
- Date: Sun, 21 May 2006 16:18:12 +0100
- Subject: Re: PATCH: fortran/27662: Transpose doesn't work on function return
- References: <20060519053511.GA8775@lucon.org> <87fyj6kozh.fsf@talisman.home> <20060519175309.GA5424@meiner.onlinehome.de>
On Friday 19 May 2006 18:53, Thomas Koenig wrote:
> On Fri, May 19, 2006 at 04:34:26PM +0100, Richard Sandiford wrote:
> > However, the use of zero strides for temporaries was an existing
> > situation, not something specific to the tranpose optimisations.
> > I'm afraid I don't know gfortran well enough to say whether it's
> > still needed. It looks like Paul has taken up the patch (thanks Paul!)
> > and he knows this stuff much better than I do.
>
> I've never seen zero stride used for anything useful.
Long ago gfortran used to pass many more array arguments via descriptors, and
pack/unpack the data in the callee. The zero stride was used to avoid an
unnecessary copy-out.
However with the ABI change to pass arrays g77-style (required for other
reasons) and the introduction of the internal_pack/internal_unpack routines
it is mostly redundant. It just bypasses the check at the start of
internal_pack.
It's probably not worth the effort nowadays.
Paul