public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Robert Dewar <dewar@gnat.com>
To: Joost VandeVondele <jv244@hermes.cam.ac.uk>
Cc: gcc@gcc.gnu.org
Subject: Re: (a+b)+c should be replaced by a+(b+c)
Date: Thu, 25 Mar 2004 14:45:00 -0000	[thread overview]
Message-ID: <4062D287.7050100@gnat.com> (raw)
In-Reply-To: <Pine.SOL.4.58.0403250711490.18567@yellow.csi.cam.ac.uk>

Joost VandeVondele wrote:

> good compilers (e.g. xlf90) will (at -O4) do higher order transforms of
> the loop to introduce blocking, independent FMAs, ... that makes this
> little piece of code about 100 times faster at O4 than O2 (what about
> LNO/SSA?). This can only be done if you allow (a+b)+c -> a+(b+c). It is
> basically what any optimized blas routine will do. Matrix multiply is a
> trivial example, if you want blas performance, call blas. There are many
> other kernels like this in e.g. scientific code that are not blas. You
> can't expect a scientist to hand unroll and block any kernel to the
> appropriate depth for any machine. There need to be a compiler option to
> do this. This can only be done if you allow (a+b)+c -> a+(b+c).

Can you really deduce this freedom from later versions of the Fortran
standard?

  reply	other threads:[~2004-03-25 12:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25 12:03 Joost VandeVondele
2004-03-25 14:45 ` Robert Dewar [this message]
2004-03-25 15:07   ` Joost VandeVondele
2004-03-25 15:18     ` Robert Dewar
2004-03-25 15:32       ` Joost VandeVondele
2004-03-25 15:59     ` Scott Robert Ladd
2004-03-25 16:18       ` Jakub Jelinek
2004-03-25 16:38         ` Scott Robert Ladd
2004-03-25 19:47           ` Laurent GUERBY
2004-03-25 20:16             ` Scott Robert Ladd
2004-03-26  2:51         ` Gabriel Paubert
2004-03-26  3:17           ` Jakub Jelinek

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=4062D287.7050100@gnat.com \
    --to=dewar@gnat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jv244@hermes.cam.ac.uk \
    /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).