Minor improvement to double-word register allocations

Jeff Law law@redhat.com
Fri May 21 18:05:00 GMT 2010


On 05/21/10 09:43, Vladimir N. Makarov wrote:
> On 05/21/2010 11:31 AM, Jeff Law wrote:
>> On 05/21/10 09:29, Chung-Lin Tang wrote:
>>> Hi there,
>>> the ARM build of trunk also fails when compiling libgcc...
>>>
>>> Judging from the comments of the ira_class_hard_reg_index array 
>>> (negative as unavailable),
>>> it seems that you probably meant this:
>>>
>>> Index: ira-costs.c
>>> ===================================================================
>>> --- ira-costs.c (revision 159662)
>>> +++ ira-costs.c (working copy)
>>> @@ -1794,7 +1794,7 @@
>>>                  {
>>>                    regno = 
>>> ira_non_ordered_class_hard_regs[cover_class][j];
>>>                    index = 
>>> ira_class_hard_reg_index[cover_class][regno];
>>> -                   ira_assert (index != 0);
>>> +                   ira_assert (index >= 0);
>>>                    reg_costs[index] += ALLOCNO_FREQ (a);
>>>                  }
>>>              }
>>>
>>> I haven't tested it, but ARM on trunk now builds again...
>> Yes.  Alternately index != -1
> Jeff and Chung-Lin, the patch is ok.  I think it was my typo, sorry.
>
> It can be committed to the trunk.
I'm running a bootstrap & regression test on x86_64-linux-gnu right now 
(the == -1 variant).  I've verified it fixes the sh4 failure and I'll 
verify it fixes the others as well.

Thanks,
Jeff



More information about the Gcc-patches mailing list