On 06/18/10 17:09, Jeff Law wrote:
I think I'd give port maintainers a quick chance to chime in as to
whether or not their port has registers in a class where the number of
hard regs to represent a given mode varies within the class. Otherwise
it looks fine.
The reason why I think it's more correct this way is that we're going to
allocate the allocno from within its cover_class. In these functions
we're trying to estimate how many registers are going to be used by an
allocno, and we should use the nregs we compute for that cover class,
even when adjusting the pressure for its superclasses (since none of the
extra registers in the superclasses can be used anyway).
Example: we have a class A of 64 bit registers and a 64 bit allocno with
cover class A; nregs would be 1. The register pressure in A would be
increased by 1, and the pressure in ALL_REGS should also be increased
only by 1, even if ALL_REGS also contains 32 bit registers, since the
existence of those is irrelevant to the allocno we're looking at. The
current code would recompute nregs when cl == ALL_REGS and set it to 2,
which I think is wrong.