public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Koenig <tkoenig@netcologne.de>
To: Toon Moene <toon@moene.org>, gcc mailing list <gcc@gcc.gnu.org>
Cc: gfortran <fortran@gcc.gnu.org>
Subject: Re: Test with an lto-build of libgfortran.
Date: Thu, 28 Sep 2023 07:33:07 +0200	[thread overview]
Message-ID: <a338b60c-5aef-4aa1-2d15-8989b5e49250@netcologne.de> (raw)
In-Reply-To: <9e347fa4-1940-46c6-a5c9-899cf5a7ae85@moene.org>

Hi Toon,

> During the GNU Tools Cauldron we discussed (at the BoF: IPA & LTO) the 
> possibility (and hazards) of building the run time libraries for various 
> compilers with -flto, enabling an -flto -static linking of programs with 
> the run time library available during link time optimizations.

This would be a big win for libgfortran, especially the array functions,
knowing that stride==1 can be a _big_ win for optimization.  This is
why LTO is such an excellent idea for Fortran in general, and for the
library in particular.

There is a PR on this with quite some discussion already,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77278 .

I've put you in CC of that bug, maybe we can discuss there more
in detail.

One point about the array functions: In the library, we use sort of a
ripple carry algorithm to step through the arrays.  This saves space
an is general, but the performance (esp for the most common one-and
two-dimensional arrays) can suffer.

[...]

> The full question of "lto-ing" run time libraries is more complicated 
> than just "whether it works" as those who attended the BoF will recall.

I didn't attend the Cauldron (but that discussion would have been
very interesting).  I think for libgfortran, a first step would be
additional work to get declarations on both sides to agree (which is
worth doing anyway).

Best regards

	Thomas



  parent reply	other threads:[~2023-09-28  5:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 18:21 Toon Moene
2023-09-27 21:48 ` Jeff Law
2023-09-28  6:25   ` Richard Biener
2023-09-28  6:29     ` Andrew Pinski
2023-09-28  7:29     ` Tobias Burnus
2023-09-28  9:51       ` Jakub Jelinek
2023-09-28 11:00         ` Tobias Burnus
2023-09-28 11:02           ` Jakub Jelinek
2023-09-28  5:33 ` Thomas Koenig [this message]
2023-09-28 19:03   ` Toon Moene
2023-09-28 19:26     ` Jakub Jelinek
2023-09-28 19:59       ` Toon Moene
2023-09-28 20:02         ` David Edelsohn
2023-09-29 10:26         ` Andrew Stubbs
2023-09-29  6:03       ` Thomas Koenig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a338b60c-5aef-4aa1-2d15-8989b5e49250@netcologne.de \
    --to=tkoenig@netcologne.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=toon@moene.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).