Path: utzoo!utgpu!jarvis.csri.toronto.edu!white.toronto.edu!cks Newsgroups: comp.lang.misc From: cks@white.toronto.edu (Chris Siebenmann) Subject: Re: 'register' variables and other goodies (was Re: Common subexpression optimization) Message-ID: <1990Feb19.155810.29127@jarvis.csri.toronto.edu> In-reply-to: cks@white.toronto.edu's message of 12 Feb 90 22:29:48 GMT References: <1624@aber-cs.UUCP> <1990Feb12.172948.17784@jarvis.csri.toronto.edu> Date: 19 Feb 90 20:58:10 GMT Lines: 38 pcg@rupert.cs.aber.ac.uk (Piercarlo Grandi) writes: [I wrote] | Profiling feedback compilers are becoming more and more common and at | least one set are fairly widely used: the MIPSco compilers. | | Sure the MIPSco people would love their compilers to be widely used... | Sure DEC is contributing powerfully... :-) :-). Well, MIPSco-based machines seem to be the dominant thing to buy here. I hope vendors will be paying attention to the quality of the MIPSco compilers and implementing similar features. Maybe one of the 88K vendors will even stick this into gcc and feed the changes back to the FSF. | When something is simple and mechanical, why not let the computer | do the drudge work? | | I tend to agree in principle. In practice, things are less clear | cut. To make use of profling and heuristic information, the | compiler has to run complex analysis and optimizing modules. This | is *bad*. The beauty of things like 'register' is that they are | absolutely safe and effective, without any analysis whatsoever. If the compiler makes use of usage hints at all, I suspect that getting it to take them from a profile file instead of from the source code is fairly easy. A sophisticated compiler will want to anyways, because its using more fine-grained granularity than a function anyways. One danger of having only programmer-level hints is that quite a few programmers will add wrong hints, or change their programs such that hints become incorrect. The only way to make sure that the hints are correct is to make their gathering and use automatic or nearly so. -- "I shall clasp my hands together and bow to the corners of the world." Number Ten Ox, "Bridge of Birds" cks@white.toronto.edu ...!{utgpu,utzoo,watmath}!utcsri!white!cks