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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fd3a5ba6349a6060 X-Google-Attributes: gid103376,public From: robert_dewar@my-dejanews.com Subject: Re: should I be interested in ada? Date: 1999/02/19 Message-ID: <7akted$i86$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 446229265 References: <7a72e6$g55$1@probity.mcc.ac.uk> <36C93BB4.1429@ecs.soton.ac.uk> <7afc1o$3mi$2@plug.news.pipex.net> <7afttr$7v3$1@nnrp1.dejanews.com> <7aganu$qsc$1@plug.news.pipex.net> <36CC11A1.C7A71642@hercii.mar.lmco.com> <7ahkn0$kab$1@plug.news.pipex.net> <36CC6AC0.25DBE56D@erols.com> <7aikfp$nhq$3@plug.news.pipex.net> <7ajkhb$dol$1@nnrp1.dejanews.com> <7aknfn$au1$1@plug.news.pipex.net> X-Http-Proxy: 1.0 x11.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Fri Feb 19 23:51:45 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-02-19T00:00:00+00:00 List-Id: In article <7aknfn$au1$1@plug.news.pipex.net>, "Nick Roberts" wrote: > Correct for most existing Ada and Fortran compilers. > However, I do not believe that this would be true for an > Ada compiler which generates code > 'late' (i.e. effectively at the linking stage). No, this is wrong! My statement was not about compilers it is about languages and the formal definition of when execution is undefined (and hence what assumptions can be made). As surely you must know it is obviously undecidable whether two parameters are aliased. Yes, analysis of the entire program (of course impractical in many cases) can determine additional aliasing information, but that has very little to do with the observation I made, which was about formal language definitions. Fortran has a definite advantage here. If you do not agree, then there is something you are missing! > I believe there is a trend, these days, for aggressively > optimising compilers to be of the 'late code' persuasion > (mine will be). Of course, admittedly, even such > compilers cannot get round the problem for the > generation of a 'shared object' library (aka DLL). I am not quite sure what you mean by "late code" persuasion. If you are simply talking about delaying code generation till link time, this is infeasible in multi-million line programs, especially given modern optimization algorithms which tend to be non-linear in the size of programs. Some modest interprocedural analysis, perhaps guided by profiling information, is indeed practical. > On the other hand, ironically, Fortran (77 and 90) often > cannot perform this optimisation (reliably), since the > language has always suffered from the fact that not all > compilers have enforced the 'no aliasing' rule, and > therefore many programs (unfortunately) have been written > which take advantage of this fact. First of all, it is of course impossible to "enforce" the no aliasing rule, that is why it such enforcement is neither expected nor required (it is like uninitialized variable access in Ada). It is quite false that compilers do not take advantage of the aliasing rules of Fortran, they very definitely do, and I do not know from where you would get a contrary impression. Even Fortran-2 on the 7090 took advantage of these rules (which were already enshrined in the Fortran 66 standard). -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own