From: Marek Polacek <polacek@redhat.com>
To: Jeff Law <law@redhat.com>
Cc: Richard Biener <richard.guenther@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix middle-end/67133, part 1
Date: Mon, 17 Aug 2015 18:01:00 -0000 [thread overview]
Message-ID: <20150817174831.GH2093@redhat.com> (raw)
In-Reply-To: <55D21A8D.50004@redhat.com>
On Mon, Aug 17, 2015 at 11:31:57AM -0600, Jeff Law wrote:
> The funny thing here is we remove the statements after the trap to avoid
> this exact situation!
>
> I think the problem with schemes that either change the order of block
> processing, or which ignore some blocks are going to run into issues. By
> walking blocks and statements in a backwards order, we address 99% of the
> problems, including uses in PHIs in a direct successor block.
>
> What's not handled is a use in a PHI at the frontier of a subgraph that
> becomes unreachable. We'd have to do the usual unreachable block analysis
> to catch and handle those properly.
>
> I don't particularly like that idea....
>
> 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.
>
>
> THen let the standard mechanisms handle things when that pass is complete.
>
> By setting cfg_altered, we'll get unreachable code removal which will
> capture most of the intended effect. DCE fires a couple more passes down in
> the pipeline to pick up the remaining tidbits.
Ok, thanks.
> Do you want to try and tackle this?
Sure. I should have a patch tomorrow :-).
Marek
next prev parent reply other threads:[~2015-08-17 17:48 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 [this message]
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
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=20150817174831.GH2093@redhat.com \
--to=polacek@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@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).