From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id E4C6B38708AA for ; Tue, 29 Sep 2020 18:19:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E4C6B38708AA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mjambor@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B2CE9B207 for ; Tue, 29 Sep 2020 18:19:02 +0000 (UTC) Resent-From: Martin Jambor Resent-Date: Tue, 29 Sep 2020 20:19:02 +0200 Resent-Message-ID: <20200929181902.GF13380@virgil.suse.cz> Resent-To: GCC Patches Message-Id: In-Reply-To: References: From: Martin Jambor Date: Mon, 21 Sep 2020 16:25:18 +0200 Subject: [PATCH 5/6] ipa-cp: Add dumping of overall_size after cloning To: GCC Patches Cc: Jan Hubicka X-Spam-Status: No, score=-3038.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Tue, 29 Sep 2020 18:19:06 -0000 When experimenting with IPA-CP parameters, especially when looking into exchange2_r, it has been very useful to know what the value of overall_size is at different stages of the decision process. This patch therefore adds it to the generated dumps. gcc/ChangeLog: 2020-09-07 Martin Jambor * ipa-cp.c (estimate_local_effects): Add overeall_size to dumped string. (decide_about_value): Add dumping new overall_size. --- gcc/ipa-cp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index f6320c787de..12acf24c553 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -3517,7 +3517,8 @@ estimate_local_effects (struct cgraph_node *node) if (dump_file) fprintf (dump_file, " Decided to specialize for all " - "known contexts, growth deemed beneficial.\n"); + "known contexts, growth (to %li) deemed " + "beneficial.\n", overall_size); } else if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, " Not cloning for all contexts because " @@ -5506,6 +5507,9 @@ decide_about_value (struct cgraph_node *node, int index, HOST_WIDE_INT offset, val->spec_node = create_specialized_node (node, known_csts, known_contexts, aggvals, callers); overall_size += val->local_size_cost; + if (dump_file && (dump_flags & TDF_DETAILS)) + fprintf (dump_file, " overall size reached %li\n", + overall_size); /* TODO: If for some lattice there is only one other known value left, make a special node for it too. */ -- 2.28.0