Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!udel!haven!adm!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.misc Subject: Re: Whether cc after f2c can optimize arrays as well as f77 can Message-ID: <4610:Nov1323:35:0390@kramden.acf.nyu.edu> Date: 13 Nov 90 23:35:03 GMT References: <6787:Nov1008:04:0290@kramden.acf.nyu.edu> <5805@lanl.gov> Organization: IR Lines: 45 In article <5805@lanl.gov> jlg@lanl.gov (Jim Giles) writes: > From article <6787:Nov1008:04:0290@kramden.acf.nyu.edu>, by brnstnd@kramden.acf.nyu.edu (Dan Bernstein): > > [...] > > [ supposed counterexample ] > >> That's just the thing! I mean, it shouldn't, should it? You stated > >> above: "The fast version will always, in practice, be selected." > >> What happened to that? Certainly, Fortran would select the _fast_ > >> version. > > As I said before, your example has NOTHING to do with Fortran, since > > there is no real (visibility) equivalent to static. > Actually, Fortran _does_ have the capability. The exact analog to the > C example I gave before is: Now you're changing the problem, because in Fortran a is visible with a wider scope. It is *not* an exact analogue. And the fast version *will* be selected---if, in fact, aliasing does not occur. > What I propose > will pick the _appropriate_ version. What you propose has nothing to do with optimizing *current* computer languages. I'm not talking about Nemesis or Q or Fortran 2001. I'm talking about C. [ as another supposed counterexample, an unreadable rendition of: ] [ int a; main() { ... sub1(&a); } ] [ sub1(x) { ... sub2(x); sub3(x); } ] [ int a; sub2(y) { ... } ] [ int b; sub3(z) { ... } ] Now a and b are GLOBAL! My solution DOES detect what aliasing goes on! Sorry for shouting, but I'm getting really sick of your unjustified attacks. If your variables have visibility as in Fortran, it *works*. If you're not talking about a program that can be expressed the same way in Fortran, then you're not talking about the same problem. > you can only get the answers right > by propagating the information about the parameters through the > call chain. You are so fascinated by whatever method you think of that you are blind to the validity of other methods. ---Dan