Path: csiph.com!4.us.feeder.erje.net!feeder.erje.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: David Brown Newsgroups: comp.compilers Subject: Re: Optimization techniques and runtime checks Date: Wed, 8 May 2019 23:02:52 +0200 Organization: A noiseless patient Spider Lines: 48 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <19-05-072@comp.compilers> References: <72d208c9-169f-155c-5e73-9ca74f78e390@gkc.org.uk> <19-04-021@comp.compilers> <19-04-023@comp.compilers> <19-04-037@comp.compilers> <19-04-046@comp.compilers> <19-05-052@comp.compilers> <19-05-068@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="62877"; mail-complaints-to="abuse@iecc.com" Keywords: optimize Posted-Date: 09 May 2019 11:26:51 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:2307 On 08/05/2019 15:58, Bart wrote: > On 07/05/2019 15:29, David Brown wrote: >> On 29/04/2019 22:36, Hans-Peter Diettrich wrote: > >>> A better compiler could have a look at multiple (dependent) modules, so >>> that it can apply some more global optimizations during compilation >>> already. >> >> Indeed.  And better compilers do that - it is known as "link time >> optimisation", "whole program optimisation", "omniscient optimisation", >> "inter-module optimisation", etc. > > My recent compilers (not for C; the language doesn't really allow it) > have all been whole-program** compilers. > > Although they don't really do optimisation (it's a separate project I > might get around to), they would be ideally placed as all the source > code is available for all functions at the same time. > > There is one global, hierarchical symbol table linking all functions, > variables, types etc. across the project. > > So anyway, thanks for confirming that mine might be one of the better > compilers! Usually you are not so kind. > If your compiler can only be run as a whole-program compiler, then I might not be so kind, and complain about the lack of scalability. But I appreciate that your compiler is designed with certain use-cases in mind, and if it does the job you want it to do, then that's great. Still, being whole-program gives it the potential to have more optimisations and static error analysis than many other tools. (I have always been impressed that you have made a compiler at all - it is not an easy job. I have been critical that you have placed so much emphasis on things that I see as barely relevant, such as the size and speed of the compiler, rather than on correctly supporting the C language and its features. I have also been critical of a number of aspects of your own languages and their design, and highly critical of your claims and comparisons to other languages and tools. But again, despite that, I am greatly impressed that you have made these in the first place. If you had said "look, I've made my own language and my own tools that I find useful", I'd praise your work. It is only because you say "look, I've made my own language that is vastly superior to all other languages, and my own tools that beat the pants off every other tool ever written" that I criticise your work.)