public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Marek Polacek <polacek@redhat.com>,
	       Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix middle-end/67133, part 1
Date: Wed, 19 Aug 2015 14:25:00 -0000	[thread overview]
Message-ID: <55D48B2D.3060907@redhat.com> (raw)
In-Reply-To: <20150818194918.GB2729@redhat.com>

On 08/18/2015 01:49 PM, Marek Polacek wrote:
> On Tue, Aug 18, 2015 at 10:45:21AM +0200, Richard Biener wrote:
>> On Mon, Aug 17, 2015 at 7:31 PM, Jeff Law <law@redhat.com> wrote:
>>> But in walking through all that, I think I've stumbled on a simpler
>>> solution.  Specifically do as a little as possible and let the standard
>>> mechanisms clean things up :-)
>>>
>>> 1. Delete the code that removes instructions after the trap.
>>>
>>> 2. Split the block immediately after the trap and remove the edge
>>>     from the original block (with the trap) to the new block.
>>
>> cfg-cleanup will do that for you if you have a not returning stmt ending
>> the previous block.
>
> The following patch hopefully does what's oulined above.
> Arguably I should have renamed the insert_trap_and_remove_trailing_statements
> to something more descriptive, e.g. insert_trap_and_split_block.  Your
> call.
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>
> 2015-08-18  Marek Polacek  <polacek@redhat.com>
>
> 	PR middle-end/67133
> 	* gimple-ssa-isolate-paths.c
> 	(insert_trap_and_remove_trailing_statements): Rename to ...
> 	(insert_trap): ... this.  Don't remove trailing statements; split
> 	block instead.
> 	(find_explicit_erroneous_behaviour): Don't remove all outgoing edges.
>
> 	* g++.dg/torture/pr67133.C: New test.
Looks good to me too.
jeff

  parent reply	other threads:[~2015-08-19 13:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-14 11:51 Marek Polacek
2015-08-14 13:19 ` Richard Biener
2015-08-14 13:36   ` Marek Polacek
2015-08-14 14:54     ` Jeff Law
2015-08-14 15:33       ` Marek Polacek
2015-08-14 15:39         ` Jeff Law
2015-08-14 20:12           ` Marek Polacek
2015-08-14 20:36             ` Jeff Law
2015-08-14 21:48               ` Marek Polacek
2015-08-17 17:47                 ` Jeff Law
2015-08-17 18:01                   ` Marek Polacek
2015-08-18  8:47                   ` Richard Biener
2015-08-18 20:09                     ` Marek Polacek
2015-08-19  9:54                       ` Richard Biener
2015-08-19 10:39                         ` Marek Polacek
2015-08-19 14:25                       ` Jeff Law [this message]
2015-08-20  9:05                       ` Andreas Schwab
2015-08-20 10:50                         ` Marek Polacek
2015-08-20 10:58                           ` Andreas Schwab
2015-08-20 16:42                           ` Jeff Law
2015-08-20 16:59                             ` Marek Polacek
2015-08-20 16:59                               ` Jeff Law
2015-08-20 17:02                               ` Marek Polacek
2015-08-20 17:11                                 ` Jeff Law
2015-08-23 10:54                         ` Jan-Benedict Glaw
2015-08-24 15:55                           ` Jeff Law
2015-08-24 16:15                             ` Marek Polacek

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=55D48B2D.3060907@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=polacek@redhat.com \
    --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).