This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch 2/9: Split up and reorganize some functions


On 06/18/10 11:25, Bernd Schmidt wrote:
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.
I wasn't disagreeing with whether or not this change is more correct -- in fact, I'm in total agreement that it's more correct. I merely had a concern that if we had a port where the number of hard regs needed to represent a particular mode varied within the class was going to cause a problem. I consider the possibility unlikely, particularly since an under-estimation of the number of available regs merely results in inefficient code, not incorrect code. I just wanted to give port maintainers a chance to chime in.

I'd say, give them another 48hrs or so to object, and if none occur, go forward with the patch.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]