Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!slug!zaphod.mps.ohio-state.edu!rpi!bu.edu!snorkelwacker!spdcc!esegue!compilers-sender From: tli@%phakt.usc.edu (Tony Li) Newsgroups: comp.compilers Subject: Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) Keywords: optimize, parallel Message-ID: <1990Jun7.190315.4578@esegue.segue.boston.ma.us> Date: 7 Jun 90 19:03:15 GMT References: <1990Jun1.194941.5781@esegue.segue.boston.ma.us> <1990Jun4.212226.18389@esegue.segue.boston.ma.us> <1990Jun7.010349.2097@esegue.segue.boston.ma.us> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: tli@%phakt.usc.edu (Tony Li) Organization: University of Southern California, Los Angeles, CA Lines: 24 Approved: compilers@esegue.segue.boston.ma.us In article <1990Jun7.010349.2097@esegue.segue.boston.ma.us> larus@primost.cs.wisc.edu (James Larus) writes: Although parallel prefix may produce a different result, which is right and which is wrong? That depends. If the semantics of the language specifies an order of evaluation, then a "correct" compiler must implement that order of evaluation. If your optimizer does something different then it is either a) broken, or b) implementing a different semantics, which is a different language. If you claim that your compiler correctly implements language X and you choose option b, then you mislead your customers. You may claim that your compiler implements extensions to language X, but if you do so, I would expect the manual to describe the differences clearly. For example, I would expect that your optimizer switch would tell me in big, blinking red letters that it introduces nonstandard semantics. Tony Li - USC Computer Science Department Internet: tli@usc.edu Uucp: usc!tli -- 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.