public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Qing Zhao <qing.zhao@oracle.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: Jan Hubicka <hubicka@ucw.cz>, gcc Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Question on patch -fprofile-partial-training
Date: Thu, 4 May 2023 12:54:57 +0000	[thread overview]
Message-ID: <5FEEC8EF-85A8-4A94-ABE0-3E783F0C8A7C@oracle.com> (raw)
In-Reply-To: <cb5b6bc3-d981-9ff8-37f0-0c07363bbcfb@suse.cz>



> On May 4, 2023, at 4:30 AM, Martin Liška <mliska@suse.cz> wrote:
> 
> On 5/3/23 21:10, Qing Zhao via Gcc-patches wrote:
>> Hi, Jan,
>> 
>> You added the following patch into gcc10:
>> 
>> From 34fbe3f0946f88828765184ed6581bda62cdf49f Mon Sep 17 00:00:00 2001
>> From: Jan Hubicka <hubicka@ucw.cz>
>> Date: Thu, 5 Dec 2019 19:12:51 +0100
>> Subject: [PATCH] cgraphclones.c (localize_profile): New function.
>> 
>>        * cgraphclones.c (localize_profile): New function.
>>        (cgraph_node::create_clone): Use it for partial profiles.
>>        * common.opt (fprofile-partial-training): New flag.
>>        * doc/invoke.texi (-fprofile-partial-training): Document.
>>        * ipa-cp.c (update_profiling_info): For partial profiles do not
>>        set function profile to zero.
>>        * profile.c (compute_branch_probabilities): With partial profile
>>        watch if edge count is zero and turn all probabilities to guessed.
>>        (compute_branch_probabilities): For partial profiles do not apply
>>        profile when entry count is zero.
>>        * tree-profile.c (tree_profiling): Only do value_profile_transformations
>>        when profile is read.
>> 
>> My question is:
> 
> Hello.
> 
> Why would anybody backport such change to unsupported code-stream of GCC 8?
> Generally speaking, I discourage from doing that.

Yes, I agree.
However, many users still use GCC8 right now, and some of them are asking for more performance
from PGO recently. That’s the reason I am studying this right now. 

From my understanding, -fprofile-partial-training is one important option for PGO performance. I’d like
to see any big technique difficult to prevent it from being back ported to GCC8. 

Thanks.

Qing

> 
> Martin
> 
>> 
>> Can this patch be back ported to GCC8 easily? I am wondering any significant
>> Change between GCC8 and GCC10 that might make the backporting very hard> 
>> Thanks a lot for your help.
>> 
>> Qing


  reply	other threads:[~2023-05-04 12:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03 19:10 Qing Zhao
2023-05-04  8:30 ` Martin Liška
2023-05-04 12:54   ` Qing Zhao [this message]
2023-05-04 13:05     ` Martin Liška
2023-05-04 13:37       ` Qing Zhao
2023-05-09 10:06         ` Martin Liška
2023-05-09 10:22           ` Jan Hubicka
2023-05-09 20:11             ` Qing Zhao
2023-05-10 13:15               ` Jan Hubicka
2023-05-11 16:08                 ` Qing Zhao
2023-05-15 18:14                   ` Qing Zhao

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=5FEEC8EF-85A8-4A94-ABE0-3E783F0C8A7C@oracle.com \
    --to=qing.zhao@oracle.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=mliska@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).