public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Jambor <mjambor@suse.cz>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Jan Hubicka <jh@suse.cz>
Subject: Re: [PATCH 1/4] cgraph: Do not warn about caller count mismatches of removed functions
Date: Thu, 16 Sep 2021 17:10:32 +0200	[thread overview]
Message-ID: <ri6bl4s36af.fsf@suse.cz> (raw)
In-Reply-To: <96903a9151b41b623dc0103942b0db3f12ab50e6.1629805719.git.mjambor@suse.cz>

Hi,

On Fri, Aug 20 2021, Martin Jambor wrote:
> To verify other changes in the patch series, I have been searching for
> "Invalid sum of caller counts" string in symtab dump but found that
> there are false warnings about functions which have their body removed
> because they are now unreachable.  Those are of course invalid and so
> this patches avoids checking such cgraph_nodes.
>
> gcc/ChangeLog:
>
> 2021-08-20  Martin Jambor  <mjambor@suse.cz>
>
> 	* cgraph.c (cgraph_node::dump): Do not check caller count sums if
> 	the body has been removed.  Remove trailing whitespace.

I have pushed this patch as obvious but like to ping the rest of the
series.

Thanks,

Martin


> ---
>  gcc/cgraph.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/cgraph.c b/gcc/cgraph.c
> index 8f3af003f2a..de078653781 100644
> --- a/gcc/cgraph.c
> +++ b/gcc/cgraph.c
> @@ -2236,7 +2236,7 @@ cgraph_node::dump (FILE *f)
>      }
>    fprintf (f, "\n");
>  
> -  if (count.ipa ().initialized_p ())
> +  if (!body_removed && count.ipa ().initialized_p ())
>      {
>        bool ok = true;
>        bool min = false;
> @@ -2245,7 +2245,7 @@ cgraph_node::dump (FILE *f)
>        FOR_EACH_ALIAS (this, ref)
>  	if (dyn_cast <cgraph_node *> (ref->referring)->count.initialized_p ())
>  	  sum += dyn_cast <cgraph_node *> (ref->referring)->count.ipa ();
> -  
> +
>        if (inlined_to
>  	  || (symtab->state < EXPANSION
>  	      && ultimate_alias_target () == this && only_called_directly_p ()))
> -- 
> 2.32.0

  reply	other threads:[~2021-09-16 15:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 11:48 [PATCH 0/4] IPA-CP profile feedback handling fixes Martin Jambor
2021-08-20 17:43 ` [PATCH 3/4] ipa-cp: Fix updating of profile counts and self-gen value evaluation Martin Jambor
2021-10-08 11:31   ` Jan Hubicka
2021-10-18 16:56     ` Martin Jambor
2021-10-27 13:18       ` Martin Jambor
2021-08-20 17:43 ` [PATCH 2/4] ipa-cp: Propagation boost for recursion generated values Martin Jambor
2021-10-06 15:49   ` Jan Hubicka
2021-10-07 14:59     ` Martin Jambor
2021-10-07 15:25       ` Jan Hubicka
2021-08-20 17:43 ` [PATCH 1/4] cgraph: Do not warn about caller count mismatches of removed functions Martin Jambor
2021-09-16 15:10   ` Martin Jambor [this message]
2021-08-23 18:49 ` [PATCH 4/4] ipa-cp: Select saner profile count to base heuristics on Martin Jambor
2021-10-06 15:33   ` Jan Hubicka
2021-10-18 17:10     ` Martin Jambor
2021-10-27 13:22       ` Martin Jambor
2021-10-27 13:20   ` Martin Jambor

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=ri6bl4s36af.fsf@suse.cz \
    --to=mjambor@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jh@suse.cz \
    /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).