Re: End of Optimization

David Chase <dr2chase@mac.com>
31 Jul 2003 12:34:01 -0400

          From comp.compilers

Related articles
Re: End of Optimization dr2chase@mac.com (David Chase) (2003-07-31)
| List of all articles for this month |

From: David Chase <dr2chase@mac.com>
Newsgroups: comp.compilers
Date: 31 Jul 2003 12:34:01 -0400
Organization: Compilers Central
Keywords: optimize, architecture
Posted-Date: 31 Jul 2003 12:34:01 EDT

There's interesting work to be done in optimization if you do not
spend all your time just looking at registers and instructions. On
a multiprocessor, locking can be gruesomely expensive, and this
is a place where compiler optimization can help (Java's recursive
locks are one example of this). At a slightlly higher level (and here
there's issues of semantics-preservation versus intent-preservation)
a compiler could hoist common work in pattern-matching out of a
loop.


At the lowest level, one hindrance to compiler work has always been
the C language itself, and as long as those microcontrollers are
programmed in C, there will be useful optimizations (that could easily
have been applied to Fortran, for instance) that don't get done. I'm
not saying that they're impossible -- I'm saying that the costs of
implementing them for C, and the costs of incorporating them into an
existing C compiler (e.g., gcc) mean that they don't happen. I've
looked at the gcc internals more than once with an eye to (for
instance) adding SSA, and it was never worth my time (though I have
given implementation advice to other people with more patience).


David Chase


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.