From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id ED5BD383577C for ; Tue, 28 Jun 2022 11:12:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ED5BD383577C Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 0BCBA1F964 for ; Tue, 28 Jun 2022 11:12:56 +0000 (UTC) Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 062682C141 for ; Tue, 28 Jun 2022 11:12:56 +0000 (UTC) Date: Tue, 28 Jun 2022 11:12:55 +0000 (UTC) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Speedup loop splitting SSA update User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MISSING_MID, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2022 11:12:58 -0000 Message-ID: <20220628111255.jyK6gOyuXU4hcBWVx8iNGZKsUT1GHBzlAP-suU7VRfQ@z> 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 * 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