public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] middle-end/108086 - reduce operand scanner use from inliner
Date: Thu, 15 Dec 2022 10:32:06 +0000 (UTC)	[thread overview]
Message-ID: <20221215103206.eBIPmMKS0pzdRorfv5NaiEzdiWjl1qLat2v43C19Nok@z> (raw)

The following avoids a redundant second operand scan on all stmts
during inlining which shows with PR108086.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

	PR middle-end/108086
	* tree-inline.cc (copy_edges_for_bb): Do not update all
	stmts again.
---
 gcc/tree-inline.cc | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/gcc/tree-inline.cc b/gcc/tree-inline.cc
index 15a1a389493..addfe7fcbcc 100644
--- a/gcc/tree-inline.cc
+++ b/gcc/tree-inline.cc
@@ -2571,12 +2571,8 @@ copy_edges_for_bb (basic_block bb, profile_count num, profile_count den,
 
   for (si = gsi_start_bb (new_bb); !gsi_end_p (si);)
     {
-      gimple *copy_stmt;
       bool can_throw, nonlocal_goto;
-
-      copy_stmt = gsi_stmt (si);
-      if (!is_gimple_debug (copy_stmt))
-	update_stmt (copy_stmt);
+      gimple *copy_stmt = gsi_stmt (si);
 
       /* Do this before the possible split_block.  */
       gsi_next (&si);
-- 
2.35.3

                 reply	other threads:[~2022-12-15 10:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221215103206.eBIPmMKS0pzdRorfv5NaiEzdiWjl1qLat2v43C19Nok@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).