]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
middle-end/108086 - reduce operand scanner use from inliner
authorRichard Biener <rguenther@suse.de>
Thu, 15 Dec 2022 10:30:21 +0000 (11:30 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 15 Dec 2022 10:32:16 +0000 (11:32 +0100)
The following avoids a redundant second operand scan on all stmts
during inlining which shows with PR108086.

PR middle-end/108086
* tree-inline.cc (copy_edges_for_bb): Do not update all
stmts again.

gcc/tree-inline.cc

index 15a1a3894931456b67cd8ff47b30bb848893b8b0..addfe7fcbccc045300f5fba26b4e3c8c7f49dffc 100644 (file)
@@ -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);