From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15817 invoked by alias); 20 Sep 2019 07:50:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 15805 invoked by uid 89); 20 Sep 2019 07:50:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Sep 2019 07:50:38 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 539D3B783; Fri, 20 Sep 2019 07:50:36 +0000 (UTC) Subject: Re: [PATCH] Come up with debug counter for store-merging. To: Bernhard Reutner-Fischer , Richard Biener Cc: GCC Patches , Eric Botcazou , Jakub Jelinek References: <1cf85dcd-2cf5-f970-c3ce-0bbc7bcafcb8@suse.cz> <20190919165737.14ccca59@nbbrfq.loc> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <0e03ce02-9085-fc96-c7c7-d4f1c08dcb21@suse.cz> Date: Fri, 20 Sep 2019 07:50:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190919165737.14ccca59@nbbrfq.loc> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg01228.txt.bz2 On 9/19/19 4:57 PM, Bernhard Reutner-Fischer wrote: > On Wed, 18 Sep 2019 11:01:59 +0200 > Richard Biener wrote: > >> On Wed, Sep 18, 2019 at 9:22 AM Martin Liška wrote: >>> >>> Hi. >>> >>> After I spent quite some time with PR91758, I would like >>> to see a debug counter in store merging for the next time. >>> >>> Ready to be installed? >> OK. > >> @@ -4195,7 +4196,8 @@ imm_store_chain_info::output_merged_stores () >> bool ret = false; >> FOR_EACH_VEC_ELT (m_merged_store_groups, i, merged_store) >> { >> - if (output_merged_store (merged_store)) >> + if (dbg_cnt (store_merging) >> + && output_merged_store (merged_store)) > > Doesn't this over-count actual merged stores? You really count the number of attempted store merges, not the actual successful stores merged. As i would expect to count the latter, i would have expected .. > >> { >> unsigned int j; >> store_immediate_info *store; > > dbg_cnt (store_merging) here, i.e. after the guard that determines if > the merge is benefical, no? Hi. You are right. It's more about attempts rather than number of transformations. However, the function imm_store_chain_info::output_merged_store emits GIMPLE statements and I was unable to find a single place where to put the debug counter. Martin > > thanks, >