public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: gcc-patches@gcc.gnu.org, bonzini@gnu.org,
	seongbae.park@gmail.com,        zadeck@naturalbridge.com
Subject: Re: [PATCH] df: Keep return address register undefined until epilogue_completed
Date: Mon, 12 Sep 2016 16:33:00 -0000	[thread overview]
Message-ID: <fbfce297-671d-9785-8ab7-b11acc6d5411@redhat.com> (raw)
In-Reply-To: <20160910071744.GB7255@gate.crashing.org>

On 09/10/2016 01:17 AM, Segher Boessenkool wrote:
> On Fri, Sep 09, 2016 at 04:40:12PM -0600, Jeff Law wrote:
>> Right now the dataflow is conservatively correct WRT the return register.
>
> And conservatively incorrect wrt all other callee-saved regs!
But prior to prologue/epilogue insertion it shouldn't matter.  In fact, 
explicit references to callee saved regs prior to register allocation 
has always been problematical.

I do think our handling of life information for callee-saved regs after 
insertion of the prologue/epilogue could be improved.

In a separate shrink wrapped world ISTM that we want to move to a model 
where the return insn itself is a use of the appropriate callee saved 
regs.  If we did that I suspect some of the hacks from the separate 
shrink wrapping kit would just "go away".

Attaching actual USEs to those insns is obviously problematical though 
from a recognition standpoint.  It'd probably have to be structured more 
like what we do with CALL_INSNs to mark registers used/set.


>
>> If we made the change you want to make than the dataflow becomes overly
>> optimistic about the range over which the return register is live prior
>> to inserting the prologue/epilogue into the insn chain.
>>
>> This seems unsafe to me.
>
> Yes, but so does the current situation.  And it all seems to work
> nevertheless :-)
But that doesn't make it right...

Jeff

  reply	other threads:[~2016-09-12 16:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-29 16:50 Segher Boessenkool
2016-08-29 20:20 ` Steven Bosscher
2016-08-29 20:41   ` Segher Boessenkool
2016-09-09 22:51     ` Jeff Law
2016-09-09 22:35   ` Jeff Law
2016-09-09 22:42 ` Jeff Law
2016-09-10  8:03   ` Segher Boessenkool
2016-09-12 16:33     ` Jeff Law [this message]
2016-09-14 12:46       ` Segher Boessenkool

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=fbfce297-671d-9785-8ab7-b11acc6d5411@redhat.com \
    --to=law@redhat.com \
    --cc=bonzini@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    --cc=seongbae.park@gmail.com \
    --cc=zadeck@naturalbridge.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).