This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR57878, Incorrect code: live register clobbered in split2
- From: Wei Mi <wmi at google dot com>
- To: Vladimir Makarov <vmakarov at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Easwaran Raman <eraman at google dot com>
- Date: Fri, 19 Jul 2013 13:54:14 -0700
- Subject: Re: [PATCH] PR57878, Incorrect code: live register clobbered in split2
- References: <CA+4CFy5gc+iWoN4hCqnThnS7UXpJwA-0v3fr2_3HPSyEwfm9Rw at mail dot gmail dot com> <51E82064 dot 8020704 at redhat dot com>
Thank you! backported as r201068 in gcc-4_8-branch.
Thanks,
Wei.
On Thu, Jul 18, 2013 at 10:05 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> On 07/15/2013 02:26 PM, Wei Mi wrote:
>> Hi,
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57878
>>
>> The bug occurs because tfreq is given higher priority than bigger mode
>> in reload_pseudo_compare_func. When there are multiple reload pseudos
>> in the same insnï and the pseudo with bigger mode has lower thread
>> frequency than other reload pseudos, it is possible the bigger mode
>> pseudo cannot find available hardregs.
>>
>> The proposed fix is to switch the priority of bigger mode and tfreq in
>> reload_pseudo_compare_func. Besides I promoted lra_assert to
>> gcc_assert at the end of to make adding testcase easier since
>> lra_assert will not fire on 4.8.1.
>>
>> bootstrap and regression test are ok on x86_64-linux-gnu. Is it ok for
>> trunk and 4.8 branch?
>>
>> Thanks,
>> Wei.
>>
>> 2013-07-15 Wei Mi <wmi@google.com>
>>
>> PR rtl-optimization/57878
>> * lra-assigns.c (reload_pseudo_compare_func): Switch the priority of
>> bigger mode and tfreq.
>>
>> 2013-07-15 Wei Mi <wmi@google.com>
>>
>> PR rtl-optimization/57878
>> * g++.dg/pr57518.C: New test.
> In overall, the PR analysis and the patch is ok. The only problem the
> patch can affect generated code performance especially for 32-bit
> targets. I see regressions on 4 SPECInt2000 tests.
>
> Here is the patch I've committed into the trunk. It decreases the patch
> effect on performance.
>
> The patch was successfully bootstrapped an tested on x86/x86-64.
>
> Committed to the trunk as rev. 201036.
>
> Wei Mi, could you commit it to gcc4.8 branch.
>
> Thanks.
>
> 2013-07-18 Vladimir Makarov <vmakarov@redhat.com>
> Wei Mi <wmi@google.com>
>
> PR rtl-optimization/57878
> * lra-assigns.c (assign_by_spills): Move non_reload_pseudos to the
> top.
> (reload_pseudo_compare_func): Check nregs first for reload
> pseudos.
>
> 2013-07-18 Wei Mi <wmi@google.com>
>
> PR rtl-optimization/57878
> * g++.dg/pr57518.C: New test.
>