This is the mail archive of the
mailing list for the GCC project.
Re: Problems with the way we calculate costs
- To: Geoff Keating <geoffk at cygnus dot com>
- Subject: Re: Problems with the way we calculate costs
- From: Bernd Schmidt <bernds at redhat dot co dot uk>
- Date: Mon, 11 Sep 2000 10:15:25 +0100 (BST)
- cc: gcc-patches at gcc dot gnu dot org
On Mon, 11 Sep 2000, Geoff Keating wrote:
> It'd probably be better if it worked like the original code; that is,
> the cost of a non-fixed hard register is 2, compared to 1 for a
> pseudo. This ensures a pseudo gets preference, which would be the
> usual case because such hard registers should be copied into pseudos
> immediately after they appear.
The original code mixed up these register pressure considerations with
the calculation of the cost of an operation. I still think this is a
bad idea. It also won't reliably prevent lifetimes of hard registers
from being lenghtened (think of computing the cost of a shift of a
hardreg as opposed to multiplication of a pseudo).