comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <dewar@gnat.com>
Subject: Re: Gnat on OpenVMS
Date: 1999/05/20
Date: 1999-05-20T00:00:00+00:00	[thread overview]
Message-ID: <7i19la$2ci$1@nnrp1.deja.com> (raw)
In-Reply-To: 7hv83e$t2o$1@front4.grolier.fr

In article <7hv83e$t2o$1@front4.grolier.fr>,
  "Thierry Lelegard" <lelegard@club-internet.fr> wrote:
> I was forced to look at the generated code because some
> programs experienced strange Program_Error (not elab pb) and
> GDB failed when we tried to debug it. So, since I was crazy
> enough in the past to work with Alpha assembler, I decided
> to find the pb by reading the .S file. The code is uncredibly
> unefficient, even with /optim=all: no visible instruction
> rescheduling (critical issue on Alpha), "strange" usage
> of registers and memory, redundant branches, etc. I have
> often looked at GEM-generated code in the past, optimized
> gnat code looks like non-optimized gem code.

From this description it is clear that you are looking
at unoptimized GNAT code rather than optimized code. Indeed
it is the case that -O0 in gcc produces very inefficient
code. When you tell gcc not to optimize your code, it really
believes you, and does not do even the most elementary
optimizations. In addition there is no scheduling at all
in this mode.

Now, I realize you said you had said /OPTIMIZE=ALL here, so
something very strange is going on. For some reason, this
switch does not seem to be working in your environment. It
works in ours, and we definitely have not seen this problem
before. You should submit details to report@gnat.com.

In fact the code generation for the Alpha is very good. This
is one of the ports on which a lot of effort has been spent
on optimization, and in particular Digital contributed
scheduling code to gcc for the specific purpose of making
sure that gcc would do effective scheduling for this target.

What we have found in practice is that GNAT execution
efficiency is overall comparable to DEC ADa 83. For some
cases of pure computation, GNAT is significantly faster.
For some tasking and I/O cases, GNAT is slower (the range
we have seen is 2-1 in either direction, but that is at
the extreme, most cases are much closer to comparable).

No one claims that gcc generates the best conceivable code
in all circumstances. Indeed such a claim cannot be made
for any compiler, but the code quality from gcc in general
is excellent, and if you see something *THIS* far away from
reasonable code, it is likely that something is significantly
messed up in the installation or procedures.

Robert Dewar
Ada Core Technologies


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---




  parent reply	other threads:[~1999-05-20  0:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-18  0:00 Gnat on OpenVMS Thierry Lelegard
1999-05-18  0:00 ` Larry Kilgallen
1999-05-19  0:00   ` Robert Dewar
1999-05-19  0:00   ` Gautier
1999-05-19  0:00 ` Robert Dewar
1999-05-21  0:00   ` nickerson
1999-05-22  0:00     ` Larry Kilgallen
1999-05-22  0:00     ` Robert Dewar
1999-05-24  0:00       ` nickerson
1999-05-24  0:00         ` Robert Dewar
1999-05-25  0:00         ` Larry Kilgallen
1999-05-19  0:00 ` Daniel Thonon
1999-05-19  0:00   ` Thierry Lelegard
1999-05-19  0:00     ` Larry Kilgallen
1999-05-20  0:00       ` Robert Dewar
1999-05-20  0:00     ` Robert Dewar [this message]
1999-05-21  0:00       ` Daniel Thonon
1999-05-21  0:00         ` Larry Kilgallen
1999-05-19  0:00 ` Robert Dewar
1999-05-21  0:00 ` nickerson
1999-05-22  0:00   ` Robert Dewar
1999-05-22  0:00     ` Thierry Lelegard
1999-05-22  0:00       ` Larry Kilgallen
1999-05-23  0:00         ` Robert Dewar
1999-05-24  0:00           ` nickerson
1999-05-25  0:00             ` Robert Dewar
1999-05-23  0:00         ` Robert Dewar
1999-05-24  0:00           ` nickerson
1999-05-24  0:00             ` Mike
1999-05-25  0:00               ` Matthew Whiting
1999-05-25  0:00             ` Larry Kilgallen
1999-05-25  0:00               ` Thierry Lelegard
1999-05-27  0:00                 ` Pascal Obry
1999-05-22  0:00       ` Robert Dewar
replies disabled

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