Backend port: Minimizing register usage in favor of memory accesses

Jim Wilson wilson@specifixinc.com
Wed Mar 31 01:48:00 GMT 2004


xyzzy@hotpop.com wrote:
> I understand that one of the goals of any optimizing compiler is to maximize 
> use of registers since this is the fastest and least space consuming type of 
> instruction on most processors.

The goal of an optimizing compiler is to produce the fastest code for 
the target.  If the target wants registers to be used, then we use 
registers.  If the target doesn't want registers to be used, then we 
don't use registers.

> Is there any way to force the GCC backend to do this, if at all?

We have been doing this since the beginning for an i386 target.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list