May too many register variables hurt?
John F Carr
jfc at Achates.MIT.edu
Sat Nov 24 09:28:18 AEST 1990
In article <1990Nov21.221908.19871 at cbnewsm.att.com>
lfd at cbnewsm.att.com (leland.f.derbenwick) writes:
>(Anyone who
>writes a compiler capable of doing optimal register allocation on its
>own had _better_ make it ignore register declarations!)
I disagree. Often the programmer knows better than the compiler which
variables are most used. Optimizing compilers should eliminate the need for
every function to have a few register declarations, but they do not obsolete
the "register" keyword. I will agree that optimizing compilers should not
take "register" as an order; it should be treated internally as an increment
to the estimated number of uses of the variable.
--
John Carr (jfc at athena.mit.edu)
More information about the Comp.lang.c
mailing list