From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,45b50f14dadfce5b X-Google-Attributes: gid102b75,public X-Google-Thread: 110292,45b50f14dadfce5b X-Google-Attributes: gid110292,public X-Google-Thread: 1164f8,45b50f14dadfce5b X-Google-Attributes: gid1164f8,public From: Shankar Unni Subject: Re: Final kick at the "Merced Guessing Game" Date: 1997/10/17 Message-ID: <3447A5B6.3A748DB6@powertelglobal.com>#1/1 X-Deja-AN: 281939039 References: <61g30t$o2n@news-rocq.inria.fr> <343C34A7.B715A348@tonys.ecology.umn.edu> <3440F805.C98BB347@tonys.ecology.umn.edu> <61tfaa$9fr@sis.cambridge.arm.com> <61uoiu$19e$1@goanna.cs.rmit.edu.au> <3443FAEF.EE62B663@powertelglobal.com> <621dsv$h7p$1@goanna.cs.rmit.edu.au> X-Trace: 877110829 13452 (none) 206.86.0.12 Organization: Powertel Global, Inc. Newsgroups: comp.sys.intel,comp.arch,comp.sys.dec Richard A. O'Keefe wrote: > No, the point is that sophisticated compiler analysis (read: not just > interprocedural data flow analysis but cross *translation unit* data > flow analysis) is *required*. However, such analysis is becoming increasingly commonly available these days from most serious compiler vendors. I used to consider interprocedural analysis as an exotic and expensive frill, but no longer. This is not to excuse the language design shortcomings, but to say that they are no longer as great a drawback as they used to be.. > C is wrong because it cannot optimise code that _is_ clean very > well without going to a hell of a lot of work to find out that it > is clean. > Fortran is wrong because it _does_ optimise code on the _assumption_ > that it is clean. > What we really want are languages for which a compiler _can_ exploit > the absence of aliasing, side effects, &c whenever it is safe to, > needing only linear cost analysis of the source code to determine > when it is safe. The Larch annotations for C strike me as a move > in the right direction. Mmm. I'm torn on that front. I agree that such annotations are very useful. However, as a C purist, I would be satisfied with a small set of qualifiers that provided enough hints to the optimizer to exploit significant opportunities without being perfectly optimal. "const" and "volatile" (and the much-discussed "noalias" or its bastard child "restrict") are steps in the right direction. I'd also vote for a hint that a function had no memory side effects (something that, even with source, is often hard to determine). The most aggressive optimizations that *relied* on these keywords would have to be an optional level (because of the curse of legacy code), but at least they would be available. -- Shankar Unni Powertel Global, Inc. (650) 259-1700 shankar@powertelglobal.com (650) 259-1702 (fax) shankar@webnexus.com