Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 exptools; site ihdev.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!ihdev!pdg From: pdg@ihdev.UUCP (P. D. Guthrie) Newsgroups: net.lang.c Subject: Re: C "optimization" Message-ID: <403@ihdev.UUCP> Date: Sun, 17-Nov-85 16:28:51 EST Article-I.D.: ihdev.403 Posted: Sun Nov 17 16:28:51 1985 Date-Received: Tue, 19-Nov-85 03:59:02 EST References: <2539@sjuvax.UUCP> Reply-To: pdg@ihdev.UUCP (55224-P. D. Guthrie) Distribution: net Organization: AT&T Bell Laboratories Lines: 23 In article <2539@sjuvax.UUCP> jss@sjuvax.UUCP (J. Shapiro) writes: > >In the process of finding out that no one seems to do this, I have lost >some respect for the UNIX "optimizer". Now, can anyone mail me a >coherent reasoning for why UNIX cc is so inexcuseably stupid (at the >moment our postings are going out, but our incoming feed is dead)? >Can someone redeem my respect for the optimizer? > I enjoyed the comparison between the UNIX and VMS optimizers (left out for brevity), and I my only reaction is that it is typical of DEC compilers to produce super-optimized code. The Tops-20 Fortran Compiler is another example, and seems to store "synonyms" for the contents of every register, to leave out unnecessary calculations. When I was writing a Fortran compiler on a DEC-20, it seemed at first that the best way to see how to generate code was to look at the output of DEC's Fortran compiler, but that proved to be fruitless, as it would use very strange DEC-20 instructions to optimize the code down to nothing. I would be interested to know if there have been any articles published on DEC's optimization methods. Paul Guthrie ihnp4!ihdev!pdg PS, sorry to talk about Fortrash in this enlightened newsgroup :-}