Sandra Loosemore <san...@codesourcery.com> writes:
> On 05/14/2014 12:49 PM, Richard Sandiford wrote:
>> Jeff Law <l...@redhat.com> writes:
>>> On 05/13/14 14:11, Sandra Loosemore wrote:
>>>>
>>>> 2014-05-13  Catherine Moore  <c...@codesourcery.com>
>>>>           Sandra Loosemore  <san...@codesourcery.com>
>>>>
>>>>       gcc/
>>>>       * config/mips/mips.c (mips_order_regs_for_local_alloc): Delete.
>>>>       * config/mips/mips.h (ADJUST_REG_ALLOC_ORDER): Delete.
>>>>       * config/mips/mips-protos.h (mips_order_regs_for_local_alloc): 
>>>> Delete.
>>> OK for the trunk.
>>
>> Would it be OK to hold off until after the switch to LRA?  That patch
>> has been written and the MIPS parts approved, but we're waiting for
>> some legal things to be sorted out and for a fixed version of the LRA
>> EXTRA_MEMORY_CONSTRAINT patch.  I just think it'd be better to tune this
>> sort of thing once that's done, rather than tune it against reload.
>
> Richard, is it OK to commit this patch now that LRA is in, or do you 
> want to experiment some more with tuning first?  I think we're all in 
> agreement that this is broken old code that should be removed regardless 
> of whether we do other things to tune REG_ALLOC_ORDER.

Sure, go ahead.  I retried with trunk and removing the definition had
very little effect on non-MIPS16 and an overall positive effect on MIPS16.
Which is a bit ironic, given that the hook was supposed to help MIPS16
and at face value would hurt non-MIPS16 more.  It looks like moving $24
first really isn't a win for MIPS16 with IRA.

To reinforce that, I tried the old patch I posted in place of yours, but
moving $24 ahead of the other registers was better for non-MIPS16 code
and worse for MIPS16.  The MIPS16 results were as close to trunk as the
non-MIPS16 ones were with your patch; just two differences.  So the
MIPS16 benefit of your patch really is coming from having $24 after
the MIPS16 registers.

The reason for the improvement in non-MIPS16 results with my patch
seemed to be that putting the return and argument registers first leads
to less freedom of movement and thus more unfilled delay slots.  In some
cases I think these were more due to reorg.c's infamous approach to
register liveness rather than real interference.  E.g. branches to a
return statement were not having their delay slots filled with an
assignment to $2 even though the return statement set $2 itself.  Change
the assigned register from $2 to $24 and the delay slot could be filled.

So it might be interesting to experiment with putting the later
call-clobbered registers first, but that's a separate change.

Richard

Reply via email to