global & static registers? - (nf)

tjt at masscomp.UUCP tjt at masscomp.UUCP
Fri May 27 22:51:09 AEST 1983


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



More information about the Comp.lang.c mailing list