From patchwork Tue Apr 12 14:42:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 52817 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BD6603858D28 for ; Tue, 12 Apr 2022 14:43:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD6603858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1649774604; bh=iVEzmBgxCQWX2TO1vUHZaI4gDpeOHVTxwoIXQS3068M=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=m380dUF9kgOU8qfGS9WmezC4xUWqjjspDg6ay3lpey+tkdQT9b8YyFIc+5q3clhL1 R/5R7dKFIZZkxDSDxlk4/NcUnQUsn2Cw4a5ZdRMyDQ06KZqqEy1o2D2qy9inZbgMCh cJHaVxWpKHrISVVsczoeBgJQ9p6Vtpw2PFHKIJ9Y= 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 [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id EF4573858D28 for ; Tue, 12 Apr 2022 14:42:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EF4573858D28 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9A9BB210E0 for ; Tue, 12 Apr 2022 14:42:53 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7C1BA13A99 for ; Tue, 12 Apr 2022 14:42:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Q4QdHe2PVWIaOQAAMHmgww (envelope-from ) for ; Tue, 12 Apr 2022 14:42:53 +0000 Date: Tue, 12 Apr 2022 16:42:53 +0200 (CEST) To: gcc-patches@gcc.gnu.org Subject: [PATCH] ipa/104303 - revert overly conservative DCE change MIME-Version: 1.0 Message-Id: <20220412144253.7C1BA13A99@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" The following reverts the DCE change back to the original behavior which should be handled well during the propagation stage. That should fix the failures Thomas Schwinge is reporting. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-04-12 Richard Biener PR ipa/104303 * tree-ssa-dce.cc (mark_stmt_if_obviously_necessary): Do not include local escaped memory as obviously necessary stores. --- gcc/tree-ssa-dce.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-ssa-dce.cc b/gcc/tree-ssa-dce.cc index 34ce8abe33a..2067b711d5b 100644 --- a/gcc/tree-ssa-dce.cc +++ b/gcc/tree-ssa-dce.cc @@ -315,7 +315,7 @@ mark_stmt_if_obviously_necessary (gimple *stmt, bool aggressive) } if ((gimple_vdef (stmt) && keep_all_vdefs_p ()) - || stmt_may_clobber_global_p (stmt, true)) + || stmt_may_clobber_global_p (stmt, false)) { mark_stmt_necessary (stmt, true); return;