Steve Ellcey <sell...@mips.com> writes:
> On Tue, 2013-07-09 at 18:25 +0100, Richard Sandiford wrote:
>> That was always the case though.  These registers weren't enabled because
>> you can do operations on them.  They were enabled because they should make
>> ideal spill space.  Moves to and from these registers always take 2 bytes,
>> whereas stack spills take either 2 or 4 bytes (as well as being slower).
>> 
>> So it sounds like the problem is that the heuristics aren't tuned properly.
>> Disabling the registers seems like papering over the problem rather than
>> fixing it.  But since no-one is likely to do the work to fix the heuristics,
>> that isn't a good enough reason to reject the patch.
>
> Pre-LRA I don't think there was any good way to tell GCC to use a
> register for reloads but not for anything else.  I think LRA does
> support this and someone here has started looking at LRA but we haven't
> come up with register class definitions that make LRA work better then
> the existing setup (particularly in terms of MIPS16 object size).  Do
> you know if anyone else has started looking at LRA on MIPS?

No.  I should be doing it myself, sorry, but I've got distracted by
binutils stuff recently.  Glad to hear someone's looking at it.

It isn't necessarily just classes that need to change though.
Things like the register move costs might need tweaking too.

> +      and $25 (t9) because it is used as the SVR4 PIC register.  */

...as the function call address in SVR4 PIC.

Also, please make sure that the comment consistently uses tabs (sorry).
Some lines were indented purely with spaces.

OK with that change, thanks.

Richard

Reply via email to