From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73247 invoked by alias); 18 Sep 2019 07:22:23 -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 73239 invoked by uid 89); 18 Sep 2019 07:22:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= 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; Wed, 18 Sep 2019 07:22:21 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AAF56AF62; Wed, 18 Sep 2019 07:22:19 +0000 (UTC) From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] Come up with debug counter for store-merging. To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou , Jakub Jelinek Message-ID: <1cf85dcd-2cf5-f970-c3ce-0bbc7bcafcb8@suse.cz> Date: Wed, 18 Sep 2019 07:22:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1B319DB331C85E0C53A17137" X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg01051.txt.bz2 This is a multi-part message in MIME format. --------------1B319DB331C85E0C53A17137 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 501 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? Thanks, Martin gcc/ChangeLog: 2019-09-18 Martin Liska * dbgcnt.def (store_merging): New counter. * gimple-ssa-store-merging.c (imm_store_chain_info::output_merged_stores): Use it in store merging. --- gcc/dbgcnt.def | 1 + gcc/gimple-ssa-store-merging.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) --------------1B319DB331C85E0C53A17137 Content-Type: text/x-patch; name="0001-Come-up-with-debug-counter-for-store-merging.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Come-up-with-debug-counter-for-store-merging.patch" Content-length: 1050 diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index 230072f7bb5..ef981aa6967 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -196,3 +196,4 @@ DEBUG_COUNTER (vect_loop) DEBUG_COUNTER (vect_slp) DEBUG_COUNTER (dom_unreachable_edges) DEBUG_COUNTER (match) +DEBUG_COUNTER (store_merging) diff --git a/gcc/gimple-ssa-store-merging.c b/gcc/gimple-ssa-store-merging.c index 0bf64b314d6..5abaa7d18d8 100644 --- a/gcc/gimple-ssa-store-merging.c +++ b/gcc/gimple-ssa-store-merging.c @@ -166,6 +166,7 @@ #include "rtl.h" #include "expr.h" /* For get_bit_range. */ #include "optabs-tree.h" +#include "dbgcnt.h" #include "selftest.h" /* The maximum size (in bits) of the stores this pass should generate. */ @@ -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)) { unsigned int j; store_immediate_info *store; --------------1B319DB331C85E0C53A17137--