]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
middle-end/108086 - remove PR28238 fix superseeded by PR34018 fix
authorRichard Biener <rguenther@suse.de>
Fri, 16 Dec 2022 08:46:25 +0000 (09:46 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 16 Dec 2022 09:29:02 +0000 (10:29 +0100)
There's quite special code in copy_bb that handles inline substitution
of a non-invariant address in place of an invariant one that's
now handled by more generic handling of this case in remap_gimple_op_r
so this removes the special casing that happens in a hot path, providing
a small speedup.

PR middle-end/108086
* tree-inline.cc (copy_bb): Remove handling of (foo *)&this->m
substitution which is done in remap_gimple_op_r via
re-gimplifying.

gcc/tree-inline.cc

index 02d8c39c3e88862aa6833f761d6987e48865edf8..9fd971a034ceab4d26d40099ac224bc16cd0c1c3 100644 (file)
@@ -2074,21 +2074,6 @@ copy_bb (copy_body_data *id, basic_block bb,
          gimple_duplicate_stmt_histograms (cfun, stmt, id->src_cfun,
                                            orig_stmt);
 
-         /* With return slot optimization we can end up with
-            non-gimple (foo *)&this->m, fix that here.  */
-         if (is_gimple_assign (stmt)
-             && CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
-             && !is_gimple_val (gimple_assign_rhs1 (stmt)))
-           {
-             tree new_rhs;
-             new_rhs = force_gimple_operand_gsi (&seq_gsi,
-                                                 gimple_assign_rhs1 (stmt),
-                                                 true, NULL, false,
-                                                 GSI_CONTINUE_LINKING);
-             gimple_assign_set_rhs1 (stmt, new_rhs);
-             id->regimplify = false;
-           }
-
          gsi_insert_after (&seq_gsi, stmt, GSI_NEW_STMT);
 
          if (id->regimplify)