|C->C compiler? email@example.com (1996-05-13)|
|Re: C->C compiler? firstname.lastname@example.org (1996-05-14)|
|Re: C->C compiler? email@example.com (Ashish Ashtekar) (1996-05-14)|
|Re: C->C compiler? firstname.lastname@example.org (1996-05-18)|
|Re: C->C compiler? email@example.com (Stefan Monnier) (1996-05-21)|
|From:||firstname.lastname@example.org (Torben AEgidius Mogensen)|
|Date:||14 May 1996 20:18:35 -0400|
|Organization:||Department of Computer Science, U of Copenhagen|
email@example.com (Pinku Surana) writes:
>Is there a C->C compiler which optimizes C code? Many compilers for
>cheap microcontrollers churn out awful code. Since I cannot depend on
>these compilers to produce adequate code, I would like a compiler
>which optimizes the C code into unintelligible, yet fast, C code. Then
>I can use the compiler for the microcontroller to simply churn out
C-mix is a partial evaluator for a subset of C. What this means is
that it can specialize a program with respect to certain values of
input or variables. Usually, this is used to optimize for special
situations, but in some cases you can get speed-up even without fixing
parameters simply by exploiting constants inside the program text.
The optimizations done by C-mix go beyound normal constant folding, as
it can optimize for known values even when they are not constant in
the sense recognized by traditional constant folding optimization.
C-mix is at present a research tool, and in many ways incomplete, but
experiments on moderate to large real-life programs have been
performed. You can obtain a license for C-mix from DIKU. Email
firstname.lastname@example.org for details.
>[I wouldn't hold my breath. What runs fast depends on the details of your
>target architecture, stack layout, exception handling, etc. I'd look for
>better real compilers. -John]
This is of course true. If you have bad register allocation, C-mix can
not help you. Also, C-mix will in some cases (by loop-unrolling etc.)
produce programs that are much larger than the original programs,
which may be a bad thing for micro-controllers.
Torben Mogensen (email@example.com)
Return to the
Search the comp.compilers archives again.