RFA: small patch to fix IRA crash of m68k compiler
Jeff Law
law@redhat.com
Tue Sep 9 07:38:00 GMT 2008
Vladimir Makarov wrote:
> Andreas Schwab wrote:
>> Vladimir Makarov <vmakarov@redhat.com> writes:
>>
>>
>>> Andreas Schwab wrote:
>>>
>>>> Vladimir Makarov <vmakarov@redhat.com> writes:
>>>>
>>>>
>>>>> Index: ira-conflicts.c
>>>>> ===================================================================
>>>>> --- ira-conflicts.c (revision 140014)
>>>>> +++ ira-conflicts.c (working copy)
>>>>> @@ -366,6 +366,9 @@ process_regs_for_copy (rtx reg1, rtx reg
>>>>> }
>>>>> else
>>>>> return false;
>>>>> + if (hard_regno < 0)
>>>>> + /* Can not be tied. */
>>>>> + return false;
>>>>>
>>>> IMHO this is just papering over the bug. Please explain the
>>>> meaning of
>>>> the expressions for hard_rego. What is the significance of an
>>>> unrelated
>>>> register wrt. this insn for the function?
>>>>
>>>>
>>> I don't think that is just papering of the bug.
>>>
>>> (insn 22 17 28 4 /cvs/gcc/libgcc/../gcc/libgcc2.c:169 (set (reg/i:SI
>>> 0 %d0)
>>> (subreg:SI (reg/v:DI 30 [ w ]) 4)) 36 {*movsi_m68k2}
>>> (expr_list:REG_DEAD (reg/v:DI 30 [ w ])
>>> (nil)))
>>>
>>> Hard_regno here means hard register preference for pseudo#30 to
>>> remove the
>>> insn. It is not possible in this case. It would be possible if the
>>> destination register would be >= 1.
>>>
>>
>> Thanks for the explanation. Isn't it also possible that hard_regno
>> becomes too big (>= FIRST_PSEUDO_REGISTER)?
>>
> Yes, you are right. I missed this. It should be
>
> 2008-09-08 Vladimir Makarov <vmakarov@redhat.com>
>
> * ira-conflicts.c (process_regs_for_copy): Check that the hard
> regno is in the right range.
>
OK. Please install if you haven't already.
Based on Andreas's comment, can you also add a quick comment documenting
the meaning of hard_regno and how it relates to offset1 & offset2.
Consider that comment patch pre-approved.
Jeff
More information about the Gcc-patches
mailing list