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,820de86ed0dafb8a X-Google-Attributes: gid103376,public From: r_c_chapman@my-deja.com Subject: Re: Help Me Please :) Date: 2000/04/10 Message-ID: <8csvv7$87t$1@nnrp1.deja.com>#1/1 X-Deja-AN: 609151597 References: <89rlvr$gn9$1@nntp3.atl.mindspring.net> <38D8A607.F61F0FFF@mail.com> <8bqcu2$s0p$1@nnrp1.deja.com> <8brgcd$5kp$1@nnrp1.deja.com> <38ECEB56.8FD7596E@gecm.com> <8ckflm$a1t$1@nnrp1.deja.com> X-Http-Proxy: 1.0 PROXY, 1.0 x42.deja.com:80 (Squid/1.1.22) for client 193.114.91.187 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Apr 10 16:36:57 2000 GMT X-MyDeja-Info: XMYDJUIDr_c_chapman Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en-gb] (WinNT; U) Date: 2000-04-10T00:00:00+00:00 List-Id: > Certain types of optimization assist in this goal. For example, > with gnat, we usually find that -O1 assembly code is far easier > to follow than -O0 code, simply because there is so much less > of it. I concur - results from our paper in Ada Europe 99 confirm this. Brief summary: On the original SHOLIS project, we had SPARK83 targetting 68040, and we found the optimizer made very little difference to run-time and/or object-code understandability, but the Alsys compiler has hand-written code selection which makes the "unoptimized" code quite reasonable in those terms. I ported SHOLIS to SPARK95, and used GNAT/68k to recompile. At -O0, GNAT produces more code than Alsys, and it's actually harder to understand, since there are so many redundant loads and stored littered about the place. At -O1, the GNAT code is far smaller and easier reading. This is no surprise, since GCC's code selection is table-driven. Interestingly, we did not do full-scale object-code verification (OCV) on SHOLIS, owing to the long track-record and stability of the Alsys compiler. (well..and the simplicity of SPARK...) On more recent targets (e.g. PowerPC), it's really important to have _some_ optimizations on (particularly decent register allocation) since the difference between a register, a cache hit, and a main-memory access is so much more pronounced on these targets. We tried running code from VADSCross/PowerPC with -O0 on another project - the results were disappointing, so we reverted to the _default_ level of -O4 for that compiler, which proved fine (this was also a SIL4 project.) High-level optimization that perform large-scale reorganisation of code are definitely a no-no, but I can live with local improvements. Overall, I recommend you simply avoid having to do full-on OCV - it's very hard work! - Rod Chapman Praxis Critical Systems rod@praxis-cs.co.uk Sent via Deja.com http://www.deja.com/ Before you buy.