This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Backend port: Minimizing register usage in favor of memory accesses
- From: Robert Dewar <dewar at gnat dot com>
- To: Richard Earnshaw <rearnsha at arm dot com>
- Cc: Jim Wilson <wilson at specifixinc dot com>, xyzzy at hotpop dot com,gcc at gcc dot gnu dot org
- Date: Wed, 31 Mar 2004 05:51:59 -0500
- Subject: Re: Backend port: Minimizing register usage in favor of memory accesses
- References: <200403310943.i2V9hwZB013582@pc960.cambridge.arm.com>
Richard Earnshaw wrote:
Not necessarily. The goal of an optimizing compiler is to minimize some
cost metric. Sometimes that cost metric is the same as 'target execution
time' at other times it is something else, such as 'code size'
Or data size. In some embedded environments, data size and code size
are radically different metrics. The latter may be in ROM and quite
large, the former may be very limited RAM.
While minimizing code space is often closely related to minimizing
execution time of code, minimizing data space is actually sometimes
quite at odds with minimizing time.
For interesting details on some optimizations
for reducing space, see Janet Fabri's thesis on Automatic
Storage Optimization, NYU, R. Dewar advisor, 1982 (also published as
Fabri, Janet. Automatic Storage Optimization. UMI Research Press, 1982.)
Unfortunately this thesis does not seem to be online anywhere that
I can find. One day it would be nice if all University Microfilms
material made it onto the web!