This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch LRA] PR 61522 - Handle NULL targetm.spill_class
- From: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>
- To: Vladimir Makarov <vmakarov at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 16 Jun 2014 17:14:11 +0100
- Subject: Re: [Patch LRA] PR 61522 - Handle NULL targetm.spill_class
- Authentication-results: sourceware.org; auth=none
- References: <539F07D0 dot 3040609 at arm dot com> <539F174F dot 8060802 at redhat dot com>
- Reply-to: ramrad01 at arm dot com
On Mon, Jun 16, 2014 at 5:11 PM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> On 2014-06-16, 11:05 AM, Ramana Radhakrishnan wrote:
>>
>> Hi,
>>
>> This handles NULL targetm.spill_class in assign_by_spills. This
>> showed up as a segfault during a build for arm-none-linux-gnueabi(hf).
>>
>> Fix pre-approved by richi on IRC , verified that bootstrap continues
>> from where things broke further on a tree (that reverts 211600 which is
>> the next breakage causing commit on arm-none-linux-gnueabihf)
>>
>> I'll apply this in about 45 minutes when I get back to my desk if no one
>> objects.
>>
>>
>
> Ops, I've already committed the following patch (sorry I've not read email
> before doing this):
>
> I apologize for my mistake with the original patch.
>
> 2014-06-16 Vladimir Makarov <vmakarov@redhat.com>
>
> PR rtl-optimization/61522
> * lra-assigns.c (assign_by_spills): Check null
> targetm.spill_class.
>
> Index: lra-assigns.c
> ===================================================================
> --- lra-assigns.c (revision 211710)
> +++ lra-assigns.c (working copy)
> @@ -1425,7 +1425,8 @@
>
> enum reg_class rclass = lra_get_allocno_class (regno);
> enum reg_class spill_class;
>
> - if (lra_reg_info[regno].restore_regno < 0
> + if (targetm.spill_class == NULL
> + || lra_reg_info[regno].restore_regno < 0
> || ! bitmap_bit_p (&lra_inheritance_pseudos, regno)
> || (spill_class
> = ((enum reg_class)
Any reason the check couldn't be like the earlier patch ?
i.e. else if (targetm.spill_class)
{
....
}
Ramana
>