Language Independent Code Optimization?

Dave Newkirk dcn at ihuxl.UUCP
Fri Mar 16 03:32:43 AEST 1984


	There are at least two methods of code optimization I know of that
	are independent of language design.  At the high level there is constant
	folding, which depends on constants really being constant.  Since C
	doesn't have a constant declaration like Pascal, this would be limited
	to alphanumeric constants.  At the low level is the peephole optimizer,
	which looks at the code generated by the compiler and tries to do some
	optimization within a variable 'window' of instructions. If the window
	is large, more complex optimizations can be performed, but at a slower
	rate.  This can simplify some of the code that would be difficult to
	untangle at compile time.
					Dave Newkirk, ihnp4!ihuxl!dcn



More information about the Comp.lang.c mailing list