Article View: comp.lang.misc
Article #1909Re: Aggressive optimization
From: Herman Rubin
Date: Sun, 04 Nov 1990 13:44
Date: Sun, 04 Nov 1990 13:44
32 lines
2127 bytes
2127 bytes
In article <1849@exodus.Eng.Sun.COM>, chased@rbbb.Eng.Sun.COM (David Chase) writes:
> diamond@tkou02.enet.dec.com (diamond@tkovoa) writes:
> >C was invented in order to be that better assembler. If you want machine
> >level, you're supposed to program in C. That is exactly the purpose for
> >which C was created. If you want an HLL, use one; don't cripple C.
....................
> 1) several optimizations could be applied much more frequently to C if
> it weren't for possible aliasing in procedure pointer/array
> parameters. If you don't understand what I'm talking about, go read a
> book on dependence analysis -- Wolfe's _Optimizing Supercompilers ..._
> will give you a feel for what can be done to Fortran.
It is possible that this was the intention for C, but I do not know of
any machine for which it succeeds in being a better assembler. I believe
it is possible to achieve that purpose, but not in a language as limited
as C.
The big problem with aggressive optimization is that the compiler cannot
have the necessary information to know what is safe. The present "solution"
is to either only allow the compiler to do what is known, or at least believed,
to be safe, or to restrict the programmer so that the unsafe conditions
supposedly cannot arise.
There is a way out of this, which I do not believe has been tried. That is,
have the compiler ask the programmer! It may even be that the programmer
does not know, but can find out.
--
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907
Phone: (317)494-6054
hrubin@l.cc.purdue.edu (Internet, bitnet) {purdue,pur-ee}!l.cc!hrubin(UUCP)
Technical Details
Message-ID:
<2701@l.cc.purdue.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cikReferences:
<2301@wn1.sci.kun.nl> <8960018@hpfcso.HP.COM> <1849@exodus.Eng.Sun.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.lang.misc Subject: Re: Aggressive optimization Message-ID: <2701@l.cc.purdue.edu> Date: 4 Nov 90 13:44:53 GMT References: <2301@wn1.sci.kun.nl> <8960018@hpfcso.HP.COM> <1849@exodus.Eng.Sun.COM> Organization: Purdue University Statistics Department Lines: 32