From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Speedup loop splitting SSA update
Date: Tue, 28 Jun 2022 11:12:55 +0000 (UTC) [thread overview]
Message-ID: <20220628111255.piUgKJmb39QNr5eeBNoddvE-DbvPRrb7N0Wud5ndPv0@z> (raw)
Since we never process loops with inner loops that have been split
we can delay SSA update until after the pass is done with the whole
loop, avoiding the O(function-size) work associated with it.
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
2022-06-28 Richard Biener <rguenther@suse.de>
* tree-ssa-loop-split.cc (fix_loop_bb_probability): Do not
call update_ssa.
---
gcc/tree-ssa-loop-split.cc | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gcc/tree-ssa-loop-split.cc b/gcc/tree-ssa-loop-split.cc
index d61bad5ba47..bccf621493b 100644
--- a/gcc/tree-ssa-loop-split.cc
+++ b/gcc/tree-ssa-loop-split.cc
@@ -491,8 +491,6 @@ static void
fix_loop_bb_probability (class loop *loop1, class loop *loop2, edge true_edge,
edge false_edge)
{
- update_ssa (TODO_update_ssa);
-
/* Proportion first loop's bb counts except those dominated by true
branch to avoid drop 1s down. */
basic_block *bbs1, *bbs2;
@@ -1668,7 +1666,8 @@ tree_ssa_split_loops (void)
if (loop->aux)
{
/* If any of our inner loops was split, don't split us,
- and mark our containing loop as having had splits as well. */
+ and mark our containing loop as having had splits as well.
+ This allows for delaying SSA update. */
loop_outer (loop)->aux = loop;
continue;
}
--
2.35.3
next reply other threads:[~2022-06-28 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 11:12 Richard Biener [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-06-28 11:12 Richard Biener
2022-06-28 11:12 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=20220628111255.piUgKJmb39QNr5eeBNoddvE-DbvPRrb7N0Wud5ndPv0@z \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
/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).