Optimizing C Compiler Sought

Mr Mike McNally m5 at bobkat.UUCP
Mon Oct 13 23:08:49 AEST 1986


In article <4467 at brl-smoke.ARPA> NET-RELAY.ARPA>@brl-smoke.ARPA writes:
>Does anyone know of a C compiler that will use its own profiling output
>to generate faster runtime code?  I've long thought that a compiler that
>didn't accept data about the runtime behavior of a program shouldn't
>call itself a execution-time optimizing compiler - space maybe but not time.
>
>					Thanks, Scott
>
>"In an evolving man-machine system, the man will get dumber faster than 
>the machine gets smarter."

A long time ago a professor told me about a compiler that somebody had
written for a WCS lsi-11 (I think it was an 11/05).  The compiler would
use profiling information to decide which chunks of generated code needed
to be compressed into a single, newly (and automatically) microcoded
instruction.  I always thought that this was nifty, although it seemed
to me that upgrading to a faster processor would have been simpler :-)

In the case of optimizing C, there are various well-discussed semantic
characteristics of the language which prevent all but the most local
optimizations (I personally have never been convinced that this is 
always a ``feature'').  Even if it were possible to do local or global
common subexpression elimination, loop unravelling, induction variable
elimination, etc., I think that allowing the compiler to optimize 
anything it can will result in good code.  Useful profile information
might be somewhat difficult to generate, given a program with several
possible flow characteristics and large possible input sets.  The only
use of such information would be to make space/time tradeoff decisions,
and these probably are more easily done through some sort of ``pragma''
construct.

-- 
****                                                         ****
**** At Digital Lynx, we're almost in Garland, but not quite ****
****                                                         ****

Mike McNally                                    Digital Lynx Inc.
Software (not hardware) Person                  Dallas  TX  75243
uucp: ...convex!ctvax!bobkat!m5                 (214) 238-7474



More information about the Comp.lang.c mailing list