From: "Dean F. Sutherland" <dfsuther@cs.cmu.edu>
To: John McCabe <john@assen.demon.co.uk>
Subject: Re: Fortran or Ada?
Date: 1998/09/24
Date: 1998-09-24T00:00:00+00:00 [thread overview]
Message-ID: <360A5E7A.FBDFACB4@cs.cmu.edu> (raw)
In-Reply-To: 6ud2i4$sp4@gcsin3.geccs.gecm.com
See http://www.adahome.com/Ammo/Stories/Tartan-Realtime.html for
details.
In later years we also supported C++ for the TI c3x/c4x DSPs. We found
that Ada's more restricted semantics allowed us to do a much better job
of optimization with less effort than we could for C++. It's not that
the optimizations we did would have been _impossible_ in C++, but rather
that normal C++ usage encourages things that are extremely difficult to
analyze successfully. Most notably lots of aliasing that is usually
benign -- but very hard to prove that it is so.
We also built a capability for cross-module optimization of calls to
pure functions and functions with no side-effects, with transitive
analysis when needed. This was possible because A) the compiler could
successfully prove the lack of side-effects in Ada (almost never
possible in typical C++ code) and B) the compiler and program librarian
could collaboratively keep track of the extra body dependencies
introduced in the process (generally not possible in C++ either).
All in all, I'd much rather be optimizing for Ada than for C++. The
language deliberately makes lots of things easier.
Dean F. Sutherland
dfsuther@cs.cmu.edu
ex-Tartan, ex-TI compiler optimization and code generation group
John McCabe wrote:
>
> gisle@lunde.ii.uib.no (Gisle S{lensminde) wrote:
>
> <..snip..>
>
> >An example of this is the aliasing ( &variable ) in C. Because all
> >variables can be pointed to, it is much harder to "optimize away" a
> >variable. Ada is not as bad as C in this respect, and the strong typing
> >should in fact make some optimization tecniques easier,
>
> I read an interesting article in one of Tartan's (now TI I think)
> bulletins on the subject of optimising Ada Vs. C. It explained how Ada
> code could be optimised better because of the strict rules on e.g.
> function side effects, and how the library system (was it in Ada 83?)
> could be used to allow optimisation (e.g. inlining of subroutines etc)
> across compilation units in some cases.
>
> >but the total effort spent to make good Ada compilers is far less then
> >the effort of making good Fortran compilers.
>
> Can you quantify that?
> --
> Best Regards
> John McCabe
>
> =====================================================================
> Not necessarily my company or service providers opinions.
> =====================================================================
next prev parent reply other threads:[~1998-09-24 0:00 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-23 0:00 Fortran or Ada? Marin David Condic, 561.796.8997, M/S 731-96
1998-09-23 0:00 ` Gisle S{lensminde
1998-09-24 0:00 ` John McCabe
1998-09-24 0:00 ` Gisle S{lensminde
1998-09-24 0:00 ` Dean F. Sutherland [this message]
1998-09-24 0:00 ` Samuel T. Harris
-- strict thread matches above, loose matches on Subject: below --
1998-10-05 0:00 robin
1998-10-05 0:00 Condic, Marin D.
1998-10-05 0:00 Robert I. Eachus
1998-09-24 0:00 Walt Brainerd
1998-09-25 0:00 ` Robert I. Eachus
1998-09-25 0:00 ` dewarr
1998-09-23 0:00 Marin David Condic, 561.796.8997, M/S 731-96
[not found] <36068E73.F0398C54@meca.polymtl.ca>
1998-09-22 0:00 ` Gisle S{lensminde
1998-09-22 0:00 ` Jeff Templon
1998-09-22 0:00 ` Rakesh Malhotra
1998-09-22 0:00 ` Larry Kilgallen
1998-09-22 0:00 ` Corey Minyard
1998-09-22 0:00 ` dewarr
1998-09-23 0:00 ` Jeff Templon
1998-09-23 0:00 ` Corey Minyard
1998-09-24 0:00 ` Craig Burley
1998-09-25 0:00 ` dewarr
1998-09-25 0:00 ` Jonathan Guthrie
1998-09-26 0:00 ` Craig Burley
1998-09-26 0:00 ` dewarr
1998-09-26 0:00 ` Robert B. Love
1998-09-26 0:00 ` Craig Burley
1998-09-24 0:00 ` Joel Seidman
1998-09-24 0:00 ` Marc A. Criley
1998-09-24 0:00 ` dewarr
1998-09-24 0:00 ` Robert I. Eachus
1998-09-24 0:00 ` William Clodius
1998-09-25 0:00 ` dewarr
1998-09-25 0:00 ` dewarr
1998-09-25 0:00 ` Robert I. Eachus
1998-09-25 0:00 ` dewarr
1998-09-25 0:00 ` jbs
1998-09-26 0:00 ` dewarr
1998-09-28 0:00 ` jbs
1998-09-29 0:00 ` Dean F. Sutherland
1998-09-29 0:00 ` Dean F. Sutherland
1998-09-29 0:00 ` Gautier.DeMontmollin
1998-09-29 0:00 ` William B. Clodius
1998-09-30 0:00 ` jbs
1998-09-30 0:00 ` William Clodius
1998-09-30 0:00 ` dewarr
1998-09-30 0:00 ` jbs
1998-09-30 0:00 ` William Clodius
1998-10-03 0:00 ` Niklas Holsti
1998-10-03 0:00 ` Toon Moene
1998-10-03 0:00 ` Niklas Holsti
1998-10-03 0:00 ` Toon Moene
1998-10-04 0:00 ` Niklas Holsti
1998-10-05 0:00 ` Michel OLAGNON
1998-10-05 0:00 ` Ian St. John
1998-10-05 0:00 ` Richard D Riehle
1998-10-05 0:00 ` dewarr
1998-10-05 0:00 ` dewarr
1998-10-05 0:00 ` Ian St. John
1998-10-06 0:00 ` dewarr
1998-10-06 0:00 ` Ian St. John
1998-10-08 0:00 ` Gary L. Scott
1998-10-06 0:00 ` Toon Moene
1998-10-06 0:00 ` Jonathan Guthrie
1998-10-06 0:00 ` James Giles
1998-10-06 0:00 ` Mark A Biggar
1998-10-06 0:00 ` James Giles
1998-10-07 0:00 ` dewarr
1998-10-07 0:00 ` dewarr
1998-10-06 0:00 ` Michel OLAGNON
1998-10-07 0:00 ` Ian St. John
1998-09-29 0:00 ` Dean F. Sutherland
1998-10-02 0:00 ` Robert I. Eachus
1998-10-02 0:00 ` jbs
1998-10-02 0:00 ` William Clodius
1998-10-03 0:00 ` jbs
1998-10-03 0:00 ` Larry Elmore
1998-10-06 0:00 ` Robert I. Eachus
1998-10-06 0:00 ` Pat Rogers
1998-10-02 0:00 ` Geoff Bull
1998-09-24 0:00 ` Jeff Templon
1998-09-25 0:00 ` dewarr
1998-09-25 0:00 ` Dale Stanbrough
1998-09-30 0:00 ` Daniel Barker
1998-09-30 0:00 ` Lawrence Kirby
1998-10-01 0:00 ` Aaron Crane
1998-10-05 0:00 ` Terry Devine
[not found] ` <6udre0$ha1$1@nnrp1.dejane <6utg60$h6l$1@nnrp1.dejanews.com>
1998-10-01 0:00 ` robin_v
1998-09-23 0:00 ` Frank Ecke
1998-09-23 0:00 ` bglbv
1998-09-23 0:00 ` Robert I. Eachus
1998-09-24 0:00 ` Richard D Riehle
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox