This is the mail archive of the gcc@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]

Re: Loop fusion.


On 04/24/2018 09:18 AM, Richard Biener wrote:

On Mon, Apr 23, 2018 at 8:35 PM, Toon Moene <toon@moene.org> 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: toon@moene.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


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