From patchwork Sat Nov 12 01:45:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 19069 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1061790wru; Fri, 11 Nov 2022 17:46:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf6+pJj3Wx3WwSTgUuNOWtpmmLDbM2tLbF75btXMRudAEaYlFyX3rxb4pIaevyt5vLQGuqjp X-Received: by 2002:a05:6402:228f:b0:461:96fe:9fb4 with SMTP id cw15-20020a056402228f00b0046196fe9fb4mr3744450edb.373.1668217614296; Fri, 11 Nov 2022 17:46:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668217614; cv=none; d=google.com; s=arc-20160816; b=jJeDWojPkr9eyVENdyQE39cvruEhD9fUjE0NacBiqdjoq4sCgrb8xj1Qj6YeMaO84w 0rgCJdSoLK1n4/gjZ6hKefjoOriAG2jpXNkUTOJ9P8Gz8eR4ne122Ctvfj+IP4k92wGE OuU3GbhXRSEBCW7Yrd6XgbY/ecuMYpK/VMXk2Kc9GoahOGI6lge3oHtjoROQt2McZV4i 65rhNw71Fm7v/G0PTR5sKS8V4KS4KdJs9Ubep9BrFRKYzTEk8lZuRoVD8xSROXW6/wO1 iXjONnH56uy0EdIyLN7+7zkoNiL4+PC7aFrwUCBL32HL9YsrVwPikOXkmxLhxbt57vcU vPCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:subject:cc:to:from:dkim-signature:dkim-signature :dmarc-filter:delivered-to; bh=QsMZeET++YKl7lHt01TlkcYrSM751unyF63gH3XR0t4=; b=wJr20+JWNSnITUeasmt3Fq7pLK3CQpkGKY5zU3RRLN9BCsH6HdeyVwGZ8wnDxVWwcC r17B9iBo48HAtYlc+x0DrttFzdEwzZ9wLGbgj0EW9RYNa1y04vjcrSl9H3yOo2swDiKM N57FnsGhR9mQ/KVGLm+z5hTpMV2oG0U2zoM5PFyRE7Vnsgc0IXZkVx5f5VDAXF2vGNUL jVbrpoO444NuLcEVdlMJLc4M72u/+O++Nixkpn9b0EE9v0ZZmdSFGccwVdBVko0faYGL HNAzH96/znZYAcYP+ASNOHWmFME3uXAxnblLJwHlEol9S8LV1VaWjHRA5aHLjCS2/kyC TnEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Q2FhlRM5; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id cz23-20020a0564021cb700b00461f2b974d2si3076041edb.339.2022.11.11.17.46.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 17:46:54 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Q2FhlRM5; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0664D388B69C for ; Sat, 12 Nov 2022 01:45:56 +0000 (GMT) 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 DB6BF3887F4E for ; Sat, 12 Nov 2022 01:45:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DB6BF3887F4E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz 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 1D0D222532; Sat, 12 Nov 2022 01:45:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1668217529; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=QsMZeET++YKl7lHt01TlkcYrSM751unyF63gH3XR0t4=; b=Q2FhlRM5Z5fC8CvsoQPIW+nzt2jxlRQCeXaCuZ8EdM0a3fNpnbjH6+FLL000byGIuRijqL QDMPuExSEeykzjj8QMhmK4aH5J5YudtBe2xsGI/g+qAbFe86RmOPAv5xpLE99GMm0wx/R1 pAdODcGVe5A2K8M8gijQWsoWWPVDl7Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1668217529; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=QsMZeET++YKl7lHt01TlkcYrSM751unyF63gH3XR0t4=; b=5jQMnZns7e7bEl24o5CGTlhPWnSsjADDIrAImKm+oVFTSlJrxrcf6AxtcTMjERdkoVr9I5 rHOyHgZgGolFHwDw== 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 0E1AE13273; Sat, 12 Nov 2022 01:45:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KD05A7n6bmO4YwAAMHmgww (envelope-from ); Sat, 12 Nov 2022 01:45:29 +0000 From: Martin Jambor To: GCC Patches Cc: Jan Hubicka , Jan Hubicka Subject: [PATCH 02/12] ipa-cp: Do not consider useless aggregate constants User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/28.1 (x86_64-suse-linux-gnu) Date: Sat, 12 Nov 2022 02:45:28 +0100 Message-ID: MIME-Version: 1.0 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_SOFTFAIL, 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: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749252953015677230?= X-GMAIL-MSGID: =?utf-8?q?1749252953015677230?= Hi, When building vectors of known aggregate values, there is no point in including those for parameters which are not used in any way whatsoever. Bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2022-11-11 Martin Jambor * ipa-cp.cc (push_agg_values_from_edge): Do not consider constants in unused aggregate parameters. --- gcc/ipa-cp.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc index d2bcd5e5e69..02bd6a0fd1a 100644 --- a/gcc/ipa-cp.cc +++ b/gcc/ipa-cp.cc @@ -5783,7 +5783,8 @@ push_agg_values_from_edge (struct cgraph_edge *cs, } ipcp_param_lattices *plats = ipa_get_parm_lattices (dest_info, index); - if (plats->aggs_bottom) + if (!ipa_is_param_used (dest_info, index) + || plats->aggs_bottom) continue; push_agg_values_for_index_from_edge (cs, index, res, interim); }