public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Michael Matz <matz@suse.de>
Cc: Richard Biener <richard.guenther@gmail.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [RFA][PATCH][PR middle-end/61118] Improve tree CFG accuracy for setjmp/longjmp
Date: Mon, 05 Mar 2018 19:08:00 -0000	[thread overview]
Message-ID: <0869f1e3-78f3-7601-225e-e97ad68b5609@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.21.1803051751200.10187@wotan.suse.de>

On 03/05/2018 11:30 AM, Michael Matz wrote:
> Hi,
> 
> On Wed, 28 Feb 2018, Jeff Law wrote:
> 
>> The single successor test was strictly my paranoia WRT abnormal/EH edges.
>>
>> I don't immediately see why the CFG would be incorrect if the successor
>> of the setjmp block has multiple preds.
> 
> Actually, without further conditions I don't see how it would be safe for 
> the successor to have multiple preds.  We might have this situation:
> 
> bb1: ret = setjmp
> bb2: x0 = phi <x1 (bb1), foo(bbX)>
No.  Can't happen -- we're still building the initial CFG.  There are no
PHI nodes, there are no SSA_NAMEs.

We have two choices we can either target the setjmp itself, which is
what we've been doing and is inaccurate.  Or we can target the point
immediately after the setjmp, which is accurate.

After we have created the CFG, we'll proceed to build dominance
frontiers, compute lifetimes, etc that are nececessary to place the PHI
nodes.




> 
> As you noted the second "return" from setjmp is precisely after the setjmp 
> call itself, i.e. on the edge bb1->bb2.  Simply regarding it as landing at 
> the start of bb2 it becomes unclear from which edge bb2 was entered and 
> hence the runtime model of PHI nodes breaks down.
?!?    Again, we don't have PHIs and we're not simply regarding the
setjmp as landing at the start of BB2.  We are creating an edge from the
dispatcher to BB2.


Jeff

  reply	other threads:[~2018-03-05 19:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28  0:16 Jeff Law
2018-02-28 10:43 ` Richard Biener
2018-02-28 10:48   ` Richard Biener
2018-02-28 15:46     ` Jeff Law
2018-02-28 17:35   ` Jeff Law
2018-03-01 10:45     ` Richard Biener
2018-03-05 18:30     ` Michael Matz
2018-03-05 19:08       ` Jeff Law [this message]
2018-03-05 19:30         ` Michael Matz
2018-03-06  3:41           ` Jeff Law
2018-03-06  8:57             ` Richard Biener
2018-03-07  6:01               ` Jeff Law
2018-03-08  0:04                 ` Peter Bergner
2018-03-08 12:54                   ` Michael Matz
2018-03-08 13:22                     ` Richard Biener
2018-03-08 13:26                       ` Richard Biener
2018-03-08 13:28                       ` Michael Matz
2018-03-09 19:42                       ` Jeff Law
2018-03-09 20:20                         ` Richard Biener
2018-03-09 19:45                   ` Jeff Law
2018-03-06 14:17             ` Michael Matz
2018-03-06 14:43               ` Richard Biener
2018-03-06 16:31                 ` Michael Matz
2018-03-02 22:18   ` Jeff Law
2018-03-02 23:07     ` Jakub Jelinek
2018-03-02 23:17       ` Jeff Law
2018-03-05 14:07     ` Richard Biener

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=0869f1e3-78f3-7601-225e-e97ad68b5609@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=matz@suse.de \
    --cc=richard.guenther@gmail.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).