From a95b474a088187218bd4e73c1c34566e3c3fc83d Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 18 Sep 2019 11:03:14 +0200 Subject: [PATCH] Come up with debug counter for store-merging. 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. From-SVN: r275867 --- gcc/ChangeLog | 6 ++++++ gcc/dbgcnt.def | 1 + gcc/gimple-ssa-store-merging.c | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5a4fc2c6c37..5407096dff1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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. + 2019-09-17 Richard Sandiford * config/aarch64/aarch64.c (aarch64_sched_variable_issue): New 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; -- 2.30.2