public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: "Bin.Cheng" <amker.cheng@gmail.com>
Cc: bin.cheng@linux.alibaba.com,
	Richard Guenther <richard.guenther@gmail.com>,
	gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH AutoFDO/2]Treat ZERO as common profile probability/count
Date: Fri, 07 Dec 2018 16:57:00 -0000	[thread overview]
Message-ID: <20181207165706.sfgkycytc4l7rzoh@kam.mff.cuni.cz> (raw)
In-Reply-To: <CAHFci2_=TFhPXFU48Y=xe1R6vVcv7neBkiC4+8AKMCgyrJb4Gw@mail.gmail.com>

> Hi Honza,
> I have committed the typo fix as revision 266885.
> Also I followed your suggestion (IIUC) by calling
> profile_count::adjust_for_ipa_scaling for zero den in function
> update_profiling_info.  It works and does make more sense than
> changing the global zero check logic.
> Patch tested as before, is it ok?

Thanks, patch is OK.
What is situation with AutoFDO now? It would be very nice to get it
fixed for the release :)

Honza
> 
> Thanks,
> bin
> 
> diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
> index 4471bae11c7..5074ef63da1 100644
> --- a/gcc/ipa-cp.c
> +++ b/gcc/ipa-cp.c
> @@ -3715,9 +3715,11 @@ update_profiling_info (struct cgraph_node *orig_node,
>    new_sum = orig_node_count.combine_with_ipa_count (new_sum);
>    orig_node->count = remainder;
> 
> +  profile_count::adjust_for_ipa_scaling (&new_sum, &orig_node_count);
>    for (cs = new_node->callees; cs; cs = cs->next_callee)
>      cs->count = cs->count.apply_scale (new_sum, orig_node_count);
> 
> +  profile_count::adjust_for_ipa_scaling (&remainder, &orig_node_count);
>    for (cs = orig_node->callees; cs; cs = cs->next_callee)
>      cs->count = cs->count.apply_scale (remainder, orig_node_count);
> 
> 2018-12-07  Bin Cheng  <bin.cheng@linux.alibaba.com>
> 
>         * ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for
>         zero profile count.

  reply	other threads:[~2018-12-07 16:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31  8:33 bin.cheng
2018-10-31  9:43 ` Richard Biener
2018-10-31  9:57   ` Bin.Cheng
2018-11-02  5:31   ` bin.cheng
2018-11-05 14:38     ` Jan Hubicka
2018-11-05 14:40     ` Jan Hubicka
2018-11-13  6:58       ` Bin.Cheng
     [not found]   ` <20181105141206.4ncu3s2v2jxv6o54@kam.mff.cuni.cz>
2018-11-20 10:54     ` bin.cheng
     [not found]       ` <CAHFci28CQB3KK+Yp7gb8BR61UaGhAJJ-R1yzZPHxitczvgEB3w@mail.gmail.com>
2018-11-28 16:20         ` Jan Hubicka
2018-12-04  8:40           ` Bin.Cheng
2018-12-07 10:00             ` Bin.Cheng
2018-12-07 16:57               ` Jan Hubicka [this message]
2018-12-09  6:40                 ` Bin.Cheng
2018-10-31 15:02 ` Jeff Law
2018-11-01  1:11   ` Bin.Cheng

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=20181207165706.sfgkycytc4l7rzoh@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=amker.cheng@gmail.com \
    --cc=bin.cheng@linux.alibaba.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /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).