Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-beacon!Achates.MIT.edu!jfc From: jfc@Achates.MIT.edu (John F Carr) Newsgroups: comp.lang.c Subject: Re: May too many register variables hurt? Message-ID: <1990Nov23.222818.3343@athena.mit.edu> Date: 23 Nov 90 22:28:18 GMT References: <965@demott.COM> <967@mwtech.UUCP> <1990Nov21.221908.19871@cbnewsm.att.com> Sender: daemon@athena.mit.edu (Mr Background) Organization: Massachusetts Institute of Technology Lines: 15 In article <1990Nov21.221908.19871@cbnewsm.att.com> lfd@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@athena.mit.edu)