From patchwork Sat Nov 12 01:46:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 19073 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1062364wru; Fri, 11 Nov 2022 17:49:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ooZvw6Gi/ZCz8XVkMl6f/s1FaPffB1ciEVf029EhiC2lgi0c0c1utQMCOaVW0xf5s+HSp X-Received: by 2002:aa7:d80b:0:b0:460:8384:e263 with SMTP id v11-20020aa7d80b000000b004608384e263mr3783412edq.230.1668217753241; Fri, 11 Nov 2022 17:49:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668217753; cv=none; d=google.com; s=arc-20160816; b=0GWuo9cwW49a8kNeKdlWaH7iTDw/ue4ORdMAU40uU2vtj212lvwsqFNUGJ5TGPV9Kk 5G7gk3q15WT/epEhVToGenzLPL8FIQJZFPdfdwQllHc6pESBHnMI/yI5Q1Oq3gqmjRr2 prEIBdzsZ58mtN1Q242FsIGdtMCtTqw5xHdUtuXCX4oLyDmg4uZy7jE6AS/fPj+NoEjI vVAZ4pShFlhGKRdSetqTDfua/QnTHRFo6IHl9C26n7DdXKwCPqMCKE3oNLOlniiwbqTU o1tfkkTrWDCcNsvXD3sz7dIdN3t6f3zuNqOoov9XQDKgWPu/aUwCFizXb9v35MhTsfaX 4E3g== 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=p7TD9Ix4eyfDRIuvRdcMegQRb0IlFtoWXjEKtP5Gf9s=; b=A4UrKEjW3BRyAE4zybYLGcnNEUdDXcZksGUONtcITh71bvfEp//NzLC81DeDOT1JEA LPUrHFVEULpZrRE8PGDEPLJCZP+VJJR5sHVIPCpQLMG/muhkRSiyQaTgl2H6lbmuotfl L8EKgaQFDB/IqRWioCLmp65VYJBYamuk4gvfeiW+LsTXbaNDBPKayX6mOR/iknh6I806 ZvVEYt2T/V4qXnf47scHP1ui9ID0EKkI3PnIykYxV3+Y2ctsOmGwX95l3hs28z6azUyG xYOhZUJj2EAAgm6QUnvt0UrQUnnA4yqFyRs28GARnqbQDPJX8cWV05yMLDu11nUBmooe udMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Kk4QIBzD; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b="pr/GiYTa"; 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 (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id sc37-20020a1709078a2500b0078d9b5792a0si3393744ejc.319.2022.11.11.17.49.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 17:49:13 -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=Kk4QIBzD; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b="pr/GiYTa"; 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 2F6C03858028 for ; Sat, 12 Nov 2022 01:47:08 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 18F1A3896C38 for ; Sat, 12 Nov 2022 01:46:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 18F1A3896C38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass 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-out2.suse.de (Postfix) with ESMTPS id 6A2201F45F; Sat, 12 Nov 2022 01:46:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1668217568; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=p7TD9Ix4eyfDRIuvRdcMegQRb0IlFtoWXjEKtP5Gf9s=; b=Kk4QIBzDsOSfwr/AYb7sjdTE5ZubxyU5kBYycvE+qxwySftsqWg5z4Abnwem9YYafPaPj8 efMSfTIKjaURM6RqApIjRPG2bKGxqH9NVkn0dMkp38zyFw1YDfhGyFkpRMXUcmAcj7p41L oOOdp9uc+JeYeqxJKuINrsfnOxIj9FQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1668217568; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=p7TD9Ix4eyfDRIuvRdcMegQRb0IlFtoWXjEKtP5Gf9s=; b=pr/GiYTaGOMqBbrPkqpragDVWsyF5HK2KjDJD/ZDaQo2aluF0A8q+RyRUezcZjNFGV5RWv /5FAZNgJF0MplLDw== 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 5CC5D13A08; Sat, 12 Nov 2022 01:46:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id HwdlFuD6bmMOZAAAMHmgww (envelope-from ); Sat, 12 Nov 2022 01:46:08 +0000 From: Martin Jambor To: GCC Patches Cc: Jan Hubicka , Jan Hubicka Subject: [PATCH 05/12] ipa-sra: Dump edge summaries also for non-candidates User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/28.1 (x86_64-suse-linux-gnu) Date: Sat, 12 Nov 2022 02:46:07 +0100 Message-ID: MIME-Version: 1.0 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 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?1749253099154292963?= X-GMAIL-MSGID: =?utf-8?q?1749253099154292963?= Hi, this should have been part of r12-578-g717d278af93a4a. Call edge summaries provide information required for IPA-SRA transformations in the callees but are generated when analyzing callers and thus also callers which are not IPA-SRA candidates themselves. Therefore we analyze them but don't dump them, which makes the dumops quite incomplete. This patch fixes that. Bootstrapped and tested on x86_64-linux. OK for master? Thanks, Martin gcc/ChangeLog: 2021-12-14 Martin Jambor * ipa-sra.c (ipa_sra_dump_all_summaries): Dump edge summaries even for non-candidates. --- gcc/ipa-sra.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gcc/ipa-sra.cc b/gcc/ipa-sra.cc index 959e8829777..0f137e810fe 100644 --- a/gcc/ipa-sra.cc +++ b/gcc/ipa-sra.cc @@ -2806,13 +2806,10 @@ ipa_sra_dump_all_summaries (FILE *f) if (!ifs) fprintf (f, " Function does not have any associated IPA-SRA " "summary\n"); + else if (!ifs->m_candidate) + fprintf (f, " Not a candidate function\n"); else { - if (!ifs->m_candidate) - { - fprintf (f, " Not a candidate function\n"); - continue; - } if (ifs->m_returns_value) fprintf (f, " Returns value\n"); if (vec_safe_is_empty (ifs->m_parameters))