Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!snorkelwacker!spdcc!esegue!compilers-sender From: pardo@cs.washington.edu (David Keppel) Newsgroups: comp.compilers Subject: Re: Compiler optimizations Keywords: code, optimize Message-ID: <1990Jun8.033918.6344@esegue.segue.boston.ma.us> Date: 8 Jun 90 03:39:18 GMT References: <1990Jun7.171359.4020@esegue.segue.boston.ma.us> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: pardo@cs.washington.edu (David Keppel) Organization: University of Washington, Computer Science, Seattle Lines: 24 Approved: compilers@esegue.segue.boston.ma.us MCCALPIN writes: >[``ambiguous'' approach advocated by higher-level prog lang designers] Many languages have operations that have domains for which they have explicitly undefined behavior. For example in C, the code 'a[i] = i++' has two interpretations: `j=i++, a[j] = j' and `j=i++, a[i] = j'. If we want to, we can define an iteration construct `forp i=1..n' that executes all iterations in parallel. If the programmer needs restricted semantics, then the programmer restricts them explicitly. The compiler does not need to second-guess the programmer, the only question is whether the compiler exploits the information given by the programmer. So, for instance, we can define `ford i=1..n' to be a `forp' in which all iterations are executed in an order that satisfies the data dependencies but no other constraints; again, no second- guessing is needed. ;-D on ( Second-guessing the compiler-compiler ) Pardo -- pardo@cs.washington.edu {rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo -- Send compilers articles to compilers@esegue.segue.boston.ma.us {spdcc | ima | lotus}!esegue. Meta-mail to compilers-request@esegue. Please send responses to the author of the message, not the poster.