ipa: add debug counter for IPA MODREF PTA
authorMartin Liska <mliska@suse.cz>
Fri, 20 Aug 2021 12:11:00 +0000 (14:11 +0200)
committerMartin Liska <mliska@suse.cz>
Mon, 23 Aug 2021 07:36:52 +0000 (09:36 +0200)
gcc/ChangeLog:

* dbgcnt.def (DEBUG_COUNTER): New counter.
* gimple.c (gimple_call_arg_flags): Use it in IPA PTA.

gcc/dbgcnt.def
gcc/gimple.c

index 2345899..c2bcc4e 100644 (file)
@@ -175,6 +175,7 @@ DEBUG_COUNTER (ipa_cp_bits)
 DEBUG_COUNTER (ipa_cp_values)
 DEBUG_COUNTER (ipa_cp_vr)
 DEBUG_COUNTER (ipa_mod_ref)
+DEBUG_COUNTER (ipa_mod_ref_pta)
 DEBUG_COUNTER (ipa_sra_params)
 DEBUG_COUNTER (ipa_sra_retvalues)
 DEBUG_COUNTER (ira_move)
index 4e2653c..bed7ff9 100644 (file)
@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "attr-fnspec.h"
 #include "ipa-modref-tree.h"
 #include "ipa-modref.h"
-
+#include "dbgcnt.h"
 
 /* All the tuples have their operand vector (if present) at the very bottom
    of the structure.  Therefore, the offset required to find the
@@ -1601,7 +1601,8 @@ gimple_call_arg_flags (const gcall *stmt, unsigned arg)
              if ((modref_flags & EAF_DIRECT) && !(flags & EAF_DIRECT))
                modref_flags &= ~EAF_DIRECT;
            }
-         flags |= modref_flags;
+         if (dbg_cnt (ipa_mod_ref_pta))
+           flags |= modref_flags;
        }
     }
   return flags;