From: Jeff Law <law@redhat.com>
To: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Cc: Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH][6/n] Merge from match-and-simplify, make forwprop fold all stmts
Date: Fri, 24 Oct 2014 17:52:00 -0000 [thread overview]
Message-ID: <544A90E2.7090405@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.11.1410241429560.9891@zhemvz.fhfr.qr>
On 10/24/14 07:16, Richard Biener wrote:
>
> This patch makes GIMPLE forwprop fold all statements, following
> single-use SSA edges only (as suggested by Jeff and certainly
> how this will regress the least until we replace manual
> simplification code that does not restrict itself this way).
>
> forwprop is run up to 4 times at the moment (once only for -Og,
> not at all for -O0), which still seems reasonable. IMHO the
> forwprop pass immediately after inlining is somewhat superfluous,
> it was added there just for its ADDR_EXPR propagation. We should
> eventually split this pass into two.
>
> Note that just folding what we propagated into (like the SSA
> propagators do during substitute-and-fold phase) will miss
> cases where we propagate into a stmt feeding the one we could
> simplify. Unless we always fold all single-use (and their use)
> stmts we have to fold everything from time to time. Changing
> how / when we fold stuff is certainly sth to look after with
> fold_stmt now being able to follow SSA edges.
>
> Bootstrapped on x86_64-unknown-linux-gnu, testing still in progress.
>
> From earlier testing I remember I need to adjust a few testcases
> that don't expect the early folding - notably two strlenopt cases
> (previously XFAILed but then PASSed again).
>
> I also expect to massage the single-use heuristic as I get to
> merging the patterns I added for the various forwprop manual
> pattern matchings to trunk (a lot of them do not restrict themselves
> this way).
>
> Does this otherwise look ok?
>
> Thanks,
> Richard.
>
> 2014-10-24 Richard Biener <rguenther@suse.de>
>
> * tree-ssa-forwprop.c: Include tree-cfgcleanup.h and tree-into-ssa.h.
> (lattice): New global.
> (fwprop_ssa_val): New function.
> (fold_all_stmts): Likewise.
> (pass_forwprop::execute): Finally fold all stmts.
Seems reasonable. After all, we can iterate on the single-use heuristic.
jeff
next prev parent reply other threads:[~2014-10-24 17:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 13:26 Richard Biener
2014-10-24 17:52 ` Jeff Law [this message]
2014-10-27 11:33 ` Richard Biener
2014-11-05 8:25 ` Zhenqiang Chen
2015-01-06 21:06 ` H.J. Lu
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=544A90E2.7090405@redhat.com \
--to=law@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=rguenther@suse.de \
/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).