From patchwork Fri Dec 16 09:28:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 33918 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp863078wrn; Fri, 16 Dec 2022 01:29:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXvCYPaqJit4TCPgflt2iZ8UCz42fS2+KJYl5AVYYYfThai/TagbiUt8pGCxbHqpomK0ow6N X-Received: by 2002:a17:906:9c93:b0:7e4:1794:9031 with SMTP id fj19-20020a1709069c9300b007e417949031mr1362684ejc.54.1671182969380; Fri, 16 Dec 2022 01:29:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671182969; cv=none; d=google.com; s=arc-20160816; b=FszFol0qbtaKObZ2kZewUnZTJTWkM//22q0WZ9/w3eBSZYN7vd1YSPYKTYtm/+G3hf Z0KWj7f4sqUDr+1B/ug8txgund/MEXEJymeW2l2JCwUvaEcbv6lcCiL/Ag/aAyWJL3jV CH5sEXeKryyBCfZwFjtbXxDkWQjnLC+bozVNnkuIcnbDl5D53CeKHkoYhLHhGlmM0var N4pLdeBAm6wDy2YLrl7tplI2hmz792xpO8KNFJteALR184DwWf8WBPifRnoxQXP6MKuw obP6WYH2ZGN1CX1OHCUTfQpbxEMFvZ8Nt6LSmjSmIsYnRYZffJIRQ5IhkrG6WOqmB0xL i3iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:sender:errors-to:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:user-agent:subject:to:date:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=UUhb5ZavT3giqRlNh0kOBNjIqgviEazsMKxD3L+MTGM=; b=OQePf/rZqvM47KBkh2hRSud8aC/cvLV9x7eOwvhbHGVrKfN7PuL1fj63b3fXFCX5ML Jl8w7NjlhC4miH6h+yNh1fLa5YjBskTbAmy+qKjUyo+NCp+ptZ9qxvcB7Db3PKsCGHEr oFC0NRnw9QL5nCP/4ZTUqyYmJLDeEZiVumFTc3YMPNsluVHgCnwierwrnd0FiPYNwqHr pOxGEzxObIiEQcq/RvWMgtRnftEA7owQJobLklN9P2Wk5sOxSWR9Yx4ii+EJXyZ7CNwy HZB14cWk9awlJi9Zy625nR4wHkO9EZwpODjNH8+fBRGVC5PlUSTcBfviS1xsz59uh2qS Lmtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ZumsuqLw; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id sb27-20020a1709076d9b00b007aa493b067asi2186419ejc.396.2022.12.16.01.29.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 01:29:29 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ZumsuqLw; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B1681382EF28 for ; Fri, 16 Dec 2022 09:29:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1681382EF28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671182962; bh=UUhb5ZavT3giqRlNh0kOBNjIqgviEazsMKxD3L+MTGM=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ZumsuqLwVXEAwoXjljKhUhVAR82imHGARG+l5hDV3zRQWoKWP3vLI7sQf7jgqt68Q yv4PgJB1Tv1ELJLbLGuMPmy3okNQccUlSxxx14pEBx+hiCmTeoTQr/6yQq4QpwNSIx 6EVpY7oElOoLkczc1lADr7i6eZHpZNSsJiBXXM80= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 98BA93835571 for ; Fri, 16 Dec 2022 09:28:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 98BA93835571 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 722A233E1C for ; Fri, 16 Dec 2022 09:28:38 +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 6DD782C141 for ; Fri, 16 Dec 2022 09:28:38 +0000 (UTC) Date: Fri, 16 Dec 2022 09:28:38 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH] middle-end/108086 - remove PR28238 fix superseeded by PR34018 fix User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 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 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-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" Message-Id: <20221216092922.B1681382EF28@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752362353577336855?= X-GMAIL-MSGID: =?utf-8?q?1752362353577336855?= 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. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 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 | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/gcc/tree-inline.cc b/gcc/tree-inline.cc index ad8275185ac..c802792fa07 100644 --- a/gcc/tree-inline.cc +++ b/gcc/tree-inline.cc @@ -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)