This is the mail archive of the
mailing list for the GCC project.
Re: Loop fusion.
- From: Toon Moene <toon at moene dot org>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Wed, 25 Apr 2018 07:59:25 +0200
- Subject: Re: Loop fusion.
- References: <email@example.com> <CAFiYyc2Xf+uPKHBEpks=FC-=NTYB9zW-DSt4i8=cGG=fmsQk7A@mail.gmail.com> <firstname.lastname@example.org> <CAFiYyc0DprGVbBzKXgckPkz+9Z3mnjzcMCSVa1tkh=BJzJUsGA@mail.gmail.com>
On 04/24/2018 09:18 AM, Richard Biener wrote:
On Mon, Apr 23, 2018 at 8:35 PM, Toon Moene <email@example.com> wrote:
On 04/23/2018 01:00 PM, Richard Biener wrote:
Note that while it looks "obvious" in the above source fragment the IL
that is presented to optimizers may make things a lot less "low-hanging".
Well, the loops are generated by the front end, so I *assume* they are
basically the same ...
The issue will be boiler-plate code like duplicated loop header checks.
That said, it's perfectly understandable that other Fortran compilers have
high-level loop opts deeply embedded within their frontends...
I agree that this would be more easily handled in the Fortran front end.
However, for that it would first have to get a (high level) basic block
finder, because it has to be established that consecutive array
expressions are part of the same basic block.
I discussed high (i.e., Fortran-) level basic blocks briefly in my 2007
GCC Summit talk (http://moene.org/~toon/GCCSummit-2007.pdf, paragraph
7), but I do not think anyone really worked on it.
Toon Moene - e-mail: firstname.lastname@example.org - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news