From e4ee51ebcf00dc0e003f9208766cb0fbda819ac0 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 8 Oct 2020 13:16:05 +0200 Subject: [PATCH] IPA MOD REF: add debug counter. gcc/ChangeLog: * dbgcnt.def (DEBUG_COUNTER): Add ipa_mod_ref debug counter. * tree-ssa-alias.c (modref_may_conflict): Handle the counter. --- gcc/dbgcnt.def | 1 + gcc/tree-ssa-alias.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index cf8775b2b66..07946a85ecc 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -171,6 +171,7 @@ DEBUG_COUNTER (if_after_reload) DEBUG_COUNTER (if_conversion) DEBUG_COUNTER (if_conversion_tree) DEBUG_COUNTER (ipa_cp_bits) +DEBUG_COUNTER (ipa_mod_ref) DEBUG_COUNTER (ipa_sra_params) DEBUG_COUNTER (ipa_sra_retvalues) DEBUG_COUNTER (ira_move) diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 97dc4ac8814..d85f378a8ae 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see #include "ipa-modref.h" #include "attr-fnspec.h" #include "errors.h" +#include "dbgcnt.h" /* Broad overview of how alias analysis on gimple works: @@ -2470,6 +2471,9 @@ modref_may_conflict (const gimple *stmt, if (tt->every_base) return true; + if (!dbg_cnt (ipa_mod_ref)) + return true; + base_set = ao_ref_base_alias_set (ref); ref_set = ao_ref_alias_set (ref); -- 2.30.2