This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH IRA] update_equiv_regs fails to set EQUIV reg-note for pseudo with more than one definition
- From: "Bin.Cheng" <amker dot cheng at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Alex Velenko <Alex dot Velenko at arm dot com>, Felix Yang <fei dot yang0953 at gmail dot com>, "Yangfei (Felix)" <felix dot yang at huawei dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, "vmakarov at redhat dot com" <vmakarov at redhat dot com>
- Date: Tue, 3 Feb 2015 16:29:38 +0800
- Subject: Re: [PATCH IRA] update_equiv_regs fails to set EQUIV reg-note for pseudo with more than one definition
- Authentication-results: sourceware.org; auth=none
- References: <CAFc0fxz3Fdr9rgLscjTzZm0PoBn53y028tQU4=U0BXQ0kY6+KA at mail dot gmail dot com> <54206D2C dot 708 at redhat dot com> <DA41BE1DDCA941489001C7FBD7A8820E55542982 at szxema507-mbx dot china dot huawei dot com> <CAFc0fxzT7hTBONNt+_2EmQwW8jTmadPs6oWnDMRRD85=yUqzNg at mail dot gmail dot com> <CAFc0fxyu257uDv4twJiFUGd-g60NZLGyDNyQthDHwtwvPaXRpQ at mail dot gmail dot com> <5421B28F dot 1030006 at redhat dot com> <CAFc0fxx-3MA+MaeWK8eXktOP8+s3NPQMCUNvytmwJJ8FXXWQwA at mail dot gmail dot com> <5424659C dot 5040702 at redhat dot com> <CAFc0fxyBTaQOah3OBZUgs2UzQmn3RQzN4+Fm2Jou3V3=OYS4pw at mail dot gmail dot com> <5425D4A4 dot 20109 at redhat dot com> <CAFc0fxwiqbg5GHzXJczWCP1s7OWs-BKPfuwi1NiA9CwiYPUw5w at mail dot gmail dot com> <5429D2C5 dot 2090203 at redhat dot com> <CAFc0fxwGee-oj+H2C+NcJ_HZJfGH8zY2ZLuBpwCo0jD1koe6ww at mail dot gmail dot com> <54CF9ED6 dot 4080808 at arm dot com> <54D077B9 dot 1040906 at redhat dot com>
On Tue, Feb 3, 2015 at 3:24 PM, Jeff Law <law@redhat.com> wrote:
> On 02/02/15 08:59, Alex Velenko wrote:
>>
>> On 11/10/14 13:44, Felix Yang wrote:
>>>
>>> Hello Jeff,
>>>
>>> I see that you have improved the RTL typesafety issue for ira.c,
>>> so I rebased this patch
>>> on the latest trunk and change to use the new list walking
>>> interface.
>>> Bootstrapped on x86_64-SUSE-Linux and make check regression tested.
>>> OK for trunk?
>>
>> Hi Felix,
>> I believe your patch causes a regression for arm-none-eabi.
>> FAIL: gcc.target/arm/pr43920-2.c object-size text <= 54
>> FAIL: gcc.target/arm/pr43920-2.c scan-assembler-times pop 2
>>
>> This happens because your patch stops reuse of code for
>> " return -1;" statements in pr43920-2.c.
>>
>> As far as I investigated, your patch prevents adding "(expr_list (-1)
>> (nil)" in ira pass, which prevents jump2 optimization from happening.
>>
>> So before, in ira pass I could see:
>> "(insn 9 53 34 8 (set (reg:SI 110 [ D.4934 ])
>> (const_int -1 [0xffffffffffffffff]))
>> /work/fsf-trunk-ref-2/src/gcc/gcc/testsuite/gcc.target/arm/pr43920-2.c:20
>> 613
>> {*thumb2_movsi_vfp}
>> (expr_list:REG_EQUAL (const_int -1 [0xffffffffffffffff])
>> (nil)))"
>> But with your patch I get
>> "(insn 9 53 34 8 (set (reg:SI 110 [ D.5322 ])
>> (const_int -1 [0xffffffffffffffff]))
>> /work/fsf-trunk-2/src/gcc/gcc/testsuite/gcc.target/arm/pr43920-2.c:20
>> 615 {*thumb2_movsi_vfp}
>> (nil))"
>>
>> This causes a code generation regression and needs to be fixed.
>> Kind regards,
>
> We'd need to see the full dumps. In particular is reg110 set anywhere else?
> If so then the change is doing precisely what it should be doing and the
> test needs to be updated to handle the different code we generate.
Hmm, if I understand correctly, it's a code size regression, so I
don't think it's appropriate to adapt the test case. Either the patch
or something else in GCC is doing wrong, right?
Hi Alex, could you please file a PR with full dump information for tracking?
Thanks,
bin
>
> Jeff