public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Alan Modra <amodra@gmail.com>, Olivier Hainque <hainque@adacore.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: rs6000 stack_tie mishap again
Date: Mon, 28 Mar 2016 19:58:00 -0000	[thread overview]
Message-ID: <56F96CE2.9020001@redhat.com> (raw)
In-Reply-To: <20160324041034.GB31470@bubble.grove.modra.org>

On 03/23/2016 09:10 PM, Alan Modra wrote:
> On Wed, Mar 23, 2016 at 05:04:39PM +0100, Olivier Hainque wrote:
>> The reason why 894 is not accounted in the base ref computation is because it
>> is part of the epilogue sequence, and init_alias_analysis has:
>>
>>        /* Walk the insns adding values to the new_reg_base_value array.  */
>>        for (i = 0; i < rpo_cnt; i++)
>> 	{ ...
>> 		  if (could_be_prologue_epilogue
>> 		      && prologue_epilogue_contains (insn))
>> 		    continue;
>>
>> The motivation for this is unclear to me.
>
> https://gcc.gnu.org/ml/gcc-patches/1999-08n/msg00048.html
>
>> My rough understanding is that we probably really care about frame_related
>> insns only here, at least on targets where the flag is supposed to be set
>> accurately.
>
> Also, possibly just prologue insns.  So you might be able to modify
> init_alias_analysis just to ignore the prologue and skip any need for
> yet another hook.
>
> Let's see what rth thinks.  He did say the patch might need to be
> redone.  :)
> https://gcc.gnu.org/ml/gcc-patches/1999-08n/msg00072.html

I be surprised if this is works as expected without side-effects.  You've now 
exposed the restore of the frame pointer to alias analysis, and it's probably 
not seen as constant anymore.  As you reference, I expect that any patch that 
opens the epilogue to such scrutiny is going to have to special-case the frame 
pointer as well.

That said, as Segher points out later in the thread, one can arrange for hard 
regs within the body to bleed into temporaries used within the epilogue, which 
is bad.  So perhaps this is exactly what's needed longer-term.  More 
investigation is required.

But I expect for stage4, the best solution is to strengthen the stack_tie 
pattern to block all memory.  Early scheduling of the stack frame deallocation 
(a simple logic insn) can't really be that important to performance.


r~

  parent reply	other threads:[~2016-03-28 17:42 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 16:24 Olivier Hainque
2016-03-24  7:51 ` Alan Modra
2016-03-24 10:32   ` Olivier Hainque
2016-03-24 17:00     ` Jeff Law
2016-03-28 19:58   ` Richard Henderson [this message]
2016-04-08  8:25     ` Olivier Hainque
2016-04-08 15:37       ` Segher Boessenkool
2016-04-08 16:01         ` Olivier Hainque
2016-04-11 10:15     ` Olivier Hainque
2016-04-14 15:47       ` Andreas Krebbel
2016-04-14 16:50         ` Jeff Law
2016-04-14 17:10           ` Olivier Hainque
2016-04-15  4:37             ` Andreas Krebbel
2016-04-15  7:43               ` Olivier Hainque
2016-04-15 16:42             ` Jeff Law
2016-04-15 17:05               ` Olivier Hainque
2016-04-15 17:26                 ` Segher Boessenkool
2016-04-14 22:42       ` Segher Boessenkool
2016-04-15 15:17         ` Olivier Hainque
2016-03-28  4:48 ` Segher Boessenkool
2016-03-28 11:23   ` Olivier Hainque
2016-03-28 12:44     ` Segher Boessenkool
2016-03-30  9:40       ` Olivier Hainque
2016-03-30 15:15         ` Alan Modra
2016-03-23 17:42 David Edelsohn
2016-03-24  8:17 ` Alan Modra
2016-03-24 10:17   ` Olivier Hainque

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56F96CE2.9020001@redhat.com \
    --to=rth@redhat.com \
    --cc=amodra@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hainque@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).