lee@sq.sq.com (Liam Quin) (11/10/89)
Do you know of any compilers that will optimise a program (when compiling it) taking into account data produced by profiling in some way actual runs? Clearly such data is a best a set of hints -- one could not simply eliminate all those sections of code which were not called, for example. On the other hand, the choice of which variables to put in a register, or which half of an expression to try first, can make a big difference. Similarly, expanding a function inline that is called very often might be an unexpectedly big win, even if it's quite large. So, which compilers (particularly under the Unix operating system) which exhibit this behaviour? Would it be worth adding to Gnu cc? Lee -- Liam R. Quin, Unixsys (UK) Ltd. lee@sq.com (whilst visiting Toronto for a few weeks) lee@anduk.co.uk (after Christmas, when I return to England) -- 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.
chip%soi@harvard.harvard.edu (Chip Morris) (11/14/89)
In comp.compilers Liam Quin writes: >Do you know of any compilers that will optimise a program (when compiling it) >taking into account data produced by profiling in some way actual runs? Our firm is currently working on a prototype implementation of Mike Karr's thesis, "Code Generation By Coagulation" (see the 1984 Compilers Conference proceedings for a summary paper) that uses profiles as in integral part of compilation. We presently have a code generator working from a simple intermediate language. It could be adapted to C or Pascal front-ends. Our code generator is set up to make virtually all of its optimization decisions based on an incremental cost calculation that uses the program's profile and detailed knowledge of the cost of the target machine's instruction set. Register allocation, code ordering (to minimize jumps), and storage management (e.g. access in memory or load into register?) are a few of the issues handled by cost computation. Our register allocator can do as well or better than a C programmer using register declarations. We also have a variety of schemes, some implemented, some in design, that reduce or eliminate penalties for using procedure calls. Our work is DARPA-funded and public domain, so anyone who is interested should contact me and I'll put him/her on our mailing list for technical reports and papers. -- Chip Morris, Senior Engineer Software Options, Inc., 22 Hilliard St., Cambridge MA 02138 (617) 497-5054 chip%soi@harvard.harvard.edu or ...!harvard!soi!chip -- 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.