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: <1990Feb12.172948.17784@jarvis.csri.toronto.edu> References: <1624@aber-cs.UUCP> Date: 12 Feb 90 22:29:48 GMT Lines: 30 pcg@cs.aber.ac.uk (Piercarlo Grandi) writes: | Compilers that can do a good job should either use heuristics, or | profile feedback, and are exceedingly rare. In both cases the | compiler becomes more complex (becomes it has to analyze control and | data flows as a preliminary -- it is this that makes the compiler | more complex, not the optimization per se). Profiling feedback compilers are becoming more and more common and at least one set are fairly widely used: the MIPSco compilers. As people start reading various technical reports about the gains possible and become more aware of the usefulness of this sort of thing. | I think that the programmer, *by design* (aided by heuristics and | profiling, yes) should know what is going on, and tell the compiler | instead. I agree that programmers should have some way of manually telling the compiler about usage frequency. However, given that we're already assuming a profiler at work, and the usual quality of commercial programmers, I think it's foolish not to let the compiler/linker read the profiling results directly. When something is simple and mechanical, why not let the computer do the drudge work? I wonder how many programmers even bother running a profiler on their programs? I suspect not many. -- "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