Newsgroups: comp.theory,comp.lang.scheme,comp.software-eng
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!news.kei.com!newsfeed.internetmci.com!news.sprintlink.net!mv!usenet
From: ENGR@GSSI.MV.COM (Michael Furman)
Subject: Re: Style: multiple returns and relatives
Message-ID: <DIEFEK.7py@mv.mv.com>
Mime-Version: 1.0
Organization: GSSI
Date: Tue, 21 Nov 1995 15:08:44 GMT
References: <RMARTIN.95Nov10210926@oma.com> <alberto.534.00162922@moreira.mv.com> <48k0ve$olm@ixnews7.ix.netcom.com> <skfVWbO00VohAJimgc@andrew.cmu.edu> <1995Nov2022.03.11.15213@silverton.berkeley.edu>
X-Newsreader: WinVN 0.93.10
X-Nntp-Posting-Host: gssi.mv.com
Lines: 38
Xref: glinda.oz.cs.cmu.edu comp.theory:14627 comp.lang.scheme:14354 comp.software-eng:39135

In article <1995Nov2022.03.11.15213@silverton.berkeley.edu>, 
djb@silverton.berkeley.edu says...
>
>Daniel C. Wang <dw3u+@andrew.cmu.edu> wrote:
>> Optimizing Fortran, and Sisal,
>> compilers can do much more aggressive optimizations that your average C
>> compiler on array code, because the impossible mess of pointer aliasing 
you
>> find in C, simply doesn't exist.
>
>No. A smart C compiler can optimize f2c output just as aggressively as
>a Fortran compiler could have optimized the original program.
>
>Here's how. For each function, (1) the compiler creates two versions of
>the object code for that function, one where the arguments are not
>aliased, the other where the arguments might be aliased; (2) the
>compiler checks for common examples of obviously-not-aliased arguments,
>and calls the fast version of the function in those cases.

   How do you define (and detect) obviously-not-aliased arguments? By global
analysis of all code (not just compiling single file)? I am not sure that 
even in this case it will find a lot - I guess that it will be non-recursive
(it therms of algorithms theory - like stop/nonstop problem).

   And as I remember (correct me if I am wrong) in Fortran all arguments can
be treated as no aliased.

>
>---Dan

-- 
---------------------------------------------------------------
Michael Furman,                       (603)893-1109
Geophysical Survey Systems, Inc.  fax:(603)889-3984
13 Klein Drive - P.O. Box 97          engr@gssi.mv.com 
North Salem, NH 03073-0097            71543.1334@compuserve.com
---------------------------------------------------------------

