[net.lang.c] global & static registers?

arnold@gatech.UUCP (05/25/83)

References: rlgvax.448


	This whole discussion on global and static registers may soon
be academic. The friendly folks at Bell are planning on *globally optimizing*
C with the release of Unix 6.0. My understanding of the term "globally
optimizing" is that important variable are always kept in registers.
	Please no flames if I am mis-informed. Just enlighten me as
to my error, and tell me what it really means.

	Etc., Etc.

		Arnold Robbins

	allegra!gatech!arnold
	decvax!duke!mcnc!msdc!gatech!arnold
	sb1!msdc!gatech!arnold

tjt@masscomp.UUCP (05/27/83)

Sorry, a "global optimizer" is unlikely to accomplish the same thing
as a "global register" declaration.  In compiler jargon, "local"
optimization is performed within a block of simple in-line code (no
branches and no labels), while "global" optimization performs flow
analysis and optimization over loops, conditional expressions and the
like.  Although it may include flow analysis over procedure calls,
that would be two orders of magnitude over what the current portable
c compiler does so I doubt that it would be ready for usg6.0.  Also,
it would be very difficult to come up with good heuristics for
automatically assigning variables to "global registers": I am
assuming that assigning a global register will degrade the rest of
the code enough that you only want global registers rarely.

		Tom Teixeira
		Massachusetts Computer Corporation (MASSCOMP)
		...!decvax!genrad!masscom!tjt