From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,31b8879c52cdbc65 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Gnat on OpenVMS Date: 1999/05/20 Message-ID: <7i19la$2ci$1@nnrp1.deja.com>#1/1 X-Deja-AN: 480136526 References: <7hshfq$5tc$1@front1.grolier.fr> <37424625.4A33DD44@wanadoo.fr> <7hv83e$t2o$1@front4.grolier.fr> X-Http-Proxy: 1.0 x39.deja.com:80 (Squid/1.1.22) for client 129.37.79.153 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Thu May 20 15:27:42 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-05-20T00:00:00+00:00 List-Id: In article <7hv83e$t2o$1@front4.grolier.fr>, "Thierry Lelegard" 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.---