* Re: regrename creates invalid insn
[not found] ` <m2sjgvic3r.fsf@igel.home>
@ 2012-07-11 21:31 ` Bernd Schmidt
2012-07-11 22:10 ` Steven Bosscher
0 siblings, 1 reply; 3+ messages in thread
From: Bernd Schmidt @ 2012-07-11 21:31 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Ian Lance Taylor, GCC Patches
[-- Attachment #1: Type: text/plain, Size: 553 bytes --]
On 03/26/2012 06:03 PM, Andreas Schwab wrote:
> Bernd Schmidt <bernds@codesourcery.com> writes:
>
>> Does 4.7 still have the failure at all?
>
> Yes, see PR52573.
Well, I still think having both REG_DEAD and REG_UNUSED for the same reg
is bogus, but fixing that causes trouble in reg-stack. It seems the path
of least resistance is to just cope with the situation in regrename.
The following seems to cure the problem with a 4.7 m68k cross. Also
bootstrapped and tested with -frename-registers enabled at -O2 on
x86_64-linux. Ok everywhere?
Bernd
[-- Attachment #2: deadunused.diff --]
[-- Type: text/x-patch, Size: 707 bytes --]
PR rtl-optimization/52573
* regrename.c (build_def_use): Ignore REG_DEAD notes if there is a
REG_UNUSED for the same register.
Index: regrename.c
===================================================================
--- regrename.c (revision 189425)
+++ regrename.c (working copy)
@@ -1718,7 +1718,8 @@ build_def_use (basic_block bb)
/* Step 4: Close chains for registers that die here. */
for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
- if (REG_NOTE_KIND (note) == REG_DEAD)
+ if (REG_NOTE_KIND (note) == REG_DEAD
+ && !find_regno_note (insn, REG_UNUSED, REGNO (XEXP (note, 0))))
{
remove_from_hard_reg_set (&live_hard_regs,
GET_MODE (XEXP (note, 0)),
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: regrename creates invalid insn
2012-07-11 21:31 ` regrename creates invalid insn Bernd Schmidt
@ 2012-07-11 22:10 ` Steven Bosscher
2012-07-11 22:39 ` Bernd Schmidt
0 siblings, 1 reply; 3+ messages in thread
From: Steven Bosscher @ 2012-07-11 22:10 UTC (permalink / raw)
To: Bernd Schmidt; +Cc: Andreas Schwab, Ian Lance Taylor, GCC Patches
On Wed, Jul 11, 2012 at 11:31 PM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> On 03/26/2012 06:03 PM, Andreas Schwab wrote:
>> Bernd Schmidt <bernds@codesourcery.com> writes:
>>
>>> Does 4.7 still have the failure at all?
>>
>> Yes, see PR52573.
>
> Well, I still think having both REG_DEAD and REG_UNUSED for the same reg
> is bogus, but fixing that causes trouble in reg-stack.
Oh? Before, during, or after reg-stack? IIRC reg-stack re-creates the
notes from scratch for the stack registers.
Is it possible to "filter" one of the notes (REG_DEAD or REG_UNUSED)
out in add_reg_note? IMHO you're right that having both is bogus...
Ciao!
Steven
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: regrename creates invalid insn
2012-07-11 22:10 ` Steven Bosscher
@ 2012-07-11 22:39 ` Bernd Schmidt
0 siblings, 0 replies; 3+ messages in thread
From: Bernd Schmidt @ 2012-07-11 22:39 UTC (permalink / raw)
To: Steven Bosscher; +Cc: Andreas Schwab, Ian Lance Taylor, GCC Patches
On 07/12/2012 12:10 AM, Steven Bosscher wrote:
> On Wed, Jul 11, 2012 at 11:31 PM, Bernd Schmidt <bernds@codesourcery.com> wrote:
>> On 03/26/2012 06:03 PM, Andreas Schwab wrote:
>>> Bernd Schmidt <bernds@codesourcery.com> writes:
>>>
>>>> Does 4.7 still have the failure at all?
>>>
>>> Yes, see PR52573.
>>
>> Well, I still think having both REG_DEAD and REG_UNUSED for the same reg
>> is bogus, but fixing that causes trouble in reg-stack.
>
> Oh? Before, during, or after reg-stack? IIRC reg-stack re-creates the
> notes from scratch for the stack registers.
During - it relies on the ones it finds. Search for a comment mentioning
fix_truncdi in a CLOBBER case.
> Is it possible to "filter" one of the notes (REG_DEAD or REG_UNUSED)
> out in add_reg_note? IMHO you're right that having both is bogus...
Not even necessary, there's already code in df-problems to avoid adding
REG_DEAD when it's already made a REG_UNUSED - but that code is
explicitly disabled for CLOBBERs. Go figure.
Bernd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-11 22:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <m2d38hvigj.fsf@igel.home>
[not found] ` <mcrlin5bkyx.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
[not found] ` <m24nttv7ja.fsf@igel.home>
[not found] ` <mcr4nttbhzc.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
[not found] ` <m2zkbltprm.fsf@igel.home>
[not found] ` <m2r4wxtmim.fsf@igel.home>
[not found] ` <4F707DAE.2070201@codesourcery.com>
[not found] ` <m2sjgvic3r.fsf@igel.home>
2012-07-11 21:31 ` regrename creates invalid insn Bernd Schmidt
2012-07-11 22:10 ` Steven Bosscher
2012-07-11 22:39 ` Bernd Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).