Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Achim Gratz <gratz@ite.inf.tu-dresden.de>
Subject: Re: Final results of portable benchmark for single, SMP and MPP computers
Date: 1997/04/15	[thread overview]
Message-ID: <chgh8jr4q.fsf@ite127.inf.tu-dresden.de> (raw)
In-Reply-To: 5inufv$llo@news-rocq.inria.fr


Jeffrey Potoff <jpotoff@latoso.cheme.cornell.edu> writes:

> I was under the impression that the compilers were doing this for
> you when you ran the -O5 flag in f90 (loop unrolling and 
> software pipelining).  Maybe I'm being rather naive about this,
> but unless you've written terrible code, is there much to be
> gained by manually unrolling all the loops instead of letting the
> compiler do it for you ?

It helps with dumb compilers.  It helps with smart compilers too, if
you know more than the compiler can possibly know.  For instance if
you limit the lifetime of temporaries by putting them in their own
scope, the compiler may get the message that there is no dependence to
other iterations of the loop and optimize more aggressively.  The code
I commented on was written in C, where there are much weaker
guarantees about aliasing than FORTRAN provides.  Compilers (for RISC
machines, anyway) are pretty smart about unrolling these days, you'll
be hard pressed to find an example where you can outdo the compiler
unless it didn't grok the independence of iterations.  If you find
that your compilers doesn't pipeline as much as you wish even if you
nudge it by reformulating the source, you have only assembler and m4
as last ressorts.


Achim Gratz.

--+<[ It's the small pleasures that make life so miserable. ]>+--
WWW:    http://www.inf.tu-dresden.de/~ag7/{english/}
E-Mail: gratz@ite.inf.tu-dresden.de
Phone:  +49 351 463 - 8325



  parent reply	other threads:[~1997-04-15  4:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-12  4:00 Final results of portable benchmark for single, SMP and MPP computers Robert Harley
1997-04-12  4:00 ` Jeffrey Potoff
1997-04-13  4:00 ` henley
1997-04-13  4:00 ` Achim Gratz
1997-04-14  4:00 ` Jeffrey Potoff
1997-04-15  4:00 ` Achim Gratz [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-04-15  4:00 Robert Harley
1997-04-12  4:00 Robert Harley
1997-04-11  4:00 Robert Harley
1997-04-12  4:00 ` henley
1997-04-12  4:00 ` Achim Gratz
1997-03-28  5:00 henley
1997-03-28  5:00 ` henley
1997-03-31  5:00   ` Ling Wang
1997-03-31  5:00     ` henley
1997-04-10  4:00 ` Achim Gratz
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox