Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: "H.W. Stockman" <hwstock@swcp.com>
Subject: Re: A portable benchmark for ANSI C compilers, Windows NT and MPP supercomputers.
Date: 1997/03/10	[thread overview]
Message-ID: <3324D323.18A@swcp.com> (raw)
In-Reply-To: 33248B27.1E17@cao.mts.dec.com


Peter Mayne wrote:

> Modern compilers probably are beyond "register", but not "const". In a
> function argument, const might indicate that a variable can't be
> aliased, which means that the compiler can then make assumptions that it
> couldn't usually make, and optimise accordingly (like load it into a
> register instead of leaving it in memory).
 
> There was a discussion about aliasing and its affect on code
> optimisation recently in comp.arch.

I'm very interested in this issue, since we have been testing
a code on alpha/SGI/PPro, and I spent the weekend trying to
find fool-proof ways to give the compiler hints about aliasing.
It isn't easy, and I could find few places where I was comfortable
using "const".  Putting #pragma optimize(...) around a few
key functions helped just a little, but I got almost the
same effect from declaring some vars static, removing
the few obvious aliases, and converting temporaries
to double in strategic places (when arrays were float) to rely
on ANSI aliasing rules.  It is really tough to use dynamic
allocation effectively, and also make it easy on the compiler
to detect functions that will be free from aliasing problems
(OK, I admit I never thought about this that much before,
so maybe it's easier than I thought).

In trolling for hints, I came across several discussions of
the DEC optimizing compilers; it looks like there are options
(or at least plans to implement such options) to search for
global aliasing hints, with varying degrees of agression.
I noticed the SPEC benchmarks are compiled to assume the
ANSI aliasing rules.

> PJDM
> Digital Equipment Corporation (Australia), Canberra, ACT

You should be an expert on this, que no?



  reply	other threads:[~1997-03-10  5:00 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-10  5:00 A portable benchmark for ANSI C compilers, Windows NT and MPP supercomputers Robert Harley
1997-03-10  5:00 ` henley
1997-03-11  5:00   ` Peter Mayne
1997-03-10  5:00     ` H.W. Stockman [this message]
1997-03-12  5:00       ` Peter Mayne
1997-03-11  5:00   ` dick'circle-a'buckosoft'dot'com
1997-03-10  5:00 ` henley
1997-03-11  5:00   ` henley
1997-03-12  5:00     ` Chris Ruemmler
1997-03-13  5:00       ` Paul DeMone
1997-03-14  5:00         ` Chris Ruemmler
1997-03-14  5:00           ` Paul DeMone
1997-03-14  5:00       ` Peter Mayne
1997-03-14  5:00         ` William J. Burlingame
1997-03-14  5:00         ` Chris Ruemmler
1997-03-14  5:00           ` H.W. Stockman
1997-03-12  5:00     ` henley
1997-03-14  5:00     ` Charles Hedrick
1997-03-10  5:00 ` H.W. Stockman
1997-03-13  5:00 ` Geoffrey Welsh
1997-03-15  5:00 ` henley
     [not found]   ` <332b221b.1501158@news.jussieu.fr>
1997-03-16  5:00     ` henley
1997-03-15  5:00 ` Achim Gratz
1997-03-16  5:00 ` henley
1997-03-16  5:00 ` henley
1997-03-17  5:00 ` Achim Gratz
1997-03-17  5:00 ` Peter Mayne
1997-03-17  5:00 ` henley
1997-03-17  5:00 ` Paul DeMone
  -- strict thread matches above, loose matches on Subject: below --
1997-03-12  5:00 Robert Harley
1997-03-12  5:00 ` henley
1997-03-13  5:00   ` Loesche
1997-03-15  5:00     ` Martin T. Griffin
1997-03-16  5:00 ` A portable benchmark for ANSI C compilers, Windows NT and MPP , supercomputers Paul Repacholi (prep)
1997-03-16  5:00   ` henley
1997-03-17  5:00     ` Ben Myers
1997-03-06  5:00 A portable benchmark for ANSI C compilers, Windows NT and MPP supercomputers henley
1997-03-09  5:00 ` Zlatko Calusic
1997-03-09  5:00   ` henley
1997-03-11  5:00     ` Mike Greaves
1997-03-26  5:00       ` James Mansion
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