From: "Martin Liška" <mliska@suse.cz>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Andrew MacLeod <amacleod@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Loop unswitching: support gswitch statements.
Date: Tue, 16 Nov 2021 15:40:50 +0100 [thread overview]
Message-ID: <ded0a7f3-2220-cbb8-203d-b3fb55e8a8c0@suse.cz> (raw)
In-Reply-To: <CAFiYyc0bhqJs4LMap7+M7dVyTrV-eQEjTac0hu4TfLaHWjiQNg@mail.gmail.com>
On 11/11/21 08:15, Richard Biener wrote:
> So I'd try to do no functional change first, improving the costing and
> setting up the transform to simply pick up the stmts to "fold" as discovered
> during analysis (as I hinted you possibly can use gimple_uid to mark
> the stmts that simplify, IIRC gimple_uid is preserved during copying.
> gimple_uid would also scale better than gimple_plf in case we do
> the analysis for all candidates at once).
Thinking about the analysis. Am I correct that we want to properly calculate
loop size for true and false edge of a potential gcond before the actually unswitching?
We can do that by finding a first gcond candidate, evaluate (symbolic + irange approache)
all other gcond in the loop body and use BB_REACHABLE discovery. Similarly to what we do now
at lines 378-446. Then tree_num_loop_insns can be adjusted for only these reachable blocks.
Having that, we can calculate # of insns that will live in true/false loops.
Then we can call tree_unswitch_loop and make the gcond folding as we do in the versioned loops.
Is it a step in good direction? Having that we can then extend it to gswitch statements.
Cheers,
Martin
next prev parent reply other threads:[~2021-11-16 14:40 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 8:46 Martin Liška
2021-09-19 16:50 ` Jeff Law
2021-09-28 11:50 ` Richard Biener
2021-09-28 20:39 ` Andrew MacLeod
2021-09-29 8:43 ` Richard Biener
2021-09-29 15:20 ` Andrew MacLeod
2021-09-29 15:28 ` Jeff Law
2021-09-29 15:59 ` Andrew MacLeod
2021-09-30 7:33 ` Richard Biener
2021-11-08 15:05 ` Martin Liška
2021-11-08 18:34 ` Andrew MacLeod
2021-11-08 19:45 ` Andrew MacLeod
2021-11-09 13:37 ` Richard Biener
2021-11-09 16:41 ` Andrew MacLeod
2021-11-10 7:52 ` Aldy Hernandez
2021-11-10 8:50 ` Richard Biener
2021-11-09 16:44 ` Martin Liška
2021-11-10 8:59 ` Richard Biener
2021-11-10 13:29 ` Martin Liška
2021-11-11 7:15 ` Richard Biener
2021-11-16 13:53 ` Martin Liška
2021-11-19 9:49 ` Richard Biener
2021-11-16 14:40 ` Martin Liška [this message]
2021-11-19 10:00 ` Richard Biener
2021-11-22 15:06 ` Martin Liška
2021-11-23 13:58 ` Richard Biener
2021-11-23 15:20 ` Martin Liška
2021-11-23 16:36 ` Martin Liška
2021-11-24 8:00 ` Richard Biener
2021-11-24 10:48 ` Martin Liška
2021-11-24 12:48 ` Richard Biener
2021-11-24 14:14 ` Martin Liška
2021-11-24 14:32 ` Martin Liška
2021-11-26 8:12 ` Richard Biener
2021-11-29 12:45 ` Martin Liška
2021-11-30 11:17 ` Richard Biener
2021-12-01 14:10 ` Martin Liška
2021-12-01 14:19 ` Richard Biener
2021-12-01 14:25 ` Martin Liška
2021-12-01 14:34 ` Richard Biener
2021-12-01 14:48 ` Martin Liška
2021-12-01 18:21 ` Andrew MacLeod
2021-12-02 11:45 ` Martin Liška
2021-12-02 12:01 ` Richard Biener
2021-12-02 13:10 ` Martin Liška
2021-12-02 13:46 ` Richard Biener
2021-12-08 21:06 ` Andrew MacLeod
2021-12-02 14:27 ` Andrew MacLeod
2021-12-02 16:02 ` Martin Liška
2021-12-03 14:09 ` Andrew MacLeod
2021-12-09 12:59 ` Martin Liška
2021-12-09 14:44 ` Andrew MacLeod
2021-12-09 13:02 ` Martin Liška
2022-01-05 12:34 ` Richard Biener
2022-01-06 15:11 ` Andrew MacLeod
2022-01-06 16:02 ` Martin Liška
2022-01-06 16:20 ` Andrew MacLeod
2022-01-06 16:35 ` Martin Liška
2022-01-06 16:42 ` Andrew MacLeod
2022-01-06 16:32 ` Andrew MacLeod
2022-01-06 16:30 ` Martin Liška
2022-01-13 16:01 ` Martin Liška
2022-01-14 7:23 ` Richard Biener
2021-11-25 10:38 ` Aldy Hernandez
2021-11-26 7:45 ` Richard Biener
2021-11-24 7:46 ` Richard Biener
2021-10-05 17:08 ` Andrew MacLeod
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=ded0a7f3-2220-cbb8-203d-b3fb55e8a8c0@suse.cz \
--to=mliska@suse.cz \
--cc=amacleod@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--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).