From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id 101D43861003 for ; Tue, 29 Sep 2020 18:39:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 101D43861003 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=none smtp.mailfrom=hubicka@kam.mff.cuni.cz Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 36A932829D2; Tue, 29 Sep 2020 20:39:35 +0200 (CEST) Date: Tue, 29 Sep 2020 20:39:35 +0200 From: Jan Hubicka To: Martin Jambor Cc: GCC Patches Subject: Re: [PATCH 5/6] ipa-cp: Add dumping of overall_size after cloning Message-ID: <20200929183935.GC7702@kam.mff.cuni.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-14.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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:39:38 -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. OK, thanks Honza > --- > 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 >