From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id C3C773857C50; Mon, 23 Aug 2021 07:37:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3C773857C50 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3065] ipa: add debug counter for IPA MODREF PTA X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/master X-Git-Oldrev: 59f38935d189027f172b4813a6056addaceb7cd3 X-Git-Newrev: 6f1a3668f5ee5152bdcca59843802e587339eda1 Message-Id: <20210823073728.C3C773857C50@sourceware.org> Date: Mon, 23 Aug 2021 07:37:28 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2021 07:37:28 -0000 https://gcc.gnu.org/g:6f1a3668f5ee5152bdcca59843802e587339eda1 commit r12-3065-g6f1a3668f5ee5152bdcca59843802e587339eda1 Author: Martin Liska Date: Fri Aug 20 14:11:00 2021 +0200 ipa: add debug counter for IPA MODREF PTA gcc/ChangeLog: * dbgcnt.def (DEBUG_COUNTER): New counter. * gimple.c (gimple_call_arg_flags): Use it in IPA PTA. Diff: --- gcc/dbgcnt.def | 1 + gcc/gimple.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index 2345899ba68..c2bcc4eef5e 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -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) diff --git a/gcc/gimple.c b/gcc/gimple.c index 4e2653cab2f..bed7ff9e71c 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -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;