public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] IPA MOD REF: add debug counter.
Date: Thu, 8 Oct 2020 13:33:13 +0200	[thread overview]
Message-ID: <11e93d37-84dc-c94b-c3a9-86b7519614f0@suse.cz> (raw)

I'm going to install the following tested patch.

Thanks,
Martin

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.28.0


                 reply	other threads:[~2020-10-08 11:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11e93d37-84dc-c94b-c3a9-86b7519614f0@suse.cz \
    --to=mliska@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).