From: Jan Hubicka <hubicka@ucw.cz>
To: Martin Jambor <mjambor@suse.cz>
Cc: Xionghu Luo <luoxhu@linux.ibm.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 2/4] ipa-cp: Propagation boost for recursion generated values
Date: Thu, 7 Oct 2021 17:25:24 +0200 [thread overview]
Message-ID: <20211007152524.GE67653@kam.mff.cuni.cz> (raw)
In-Reply-To: <ri6czognamz.fsf@suse.cz>
> Hi,
> >
> > If you boost every self fed value by factor of 6, I wonder how quickly
> > we run into exponential explosion of the cost (since the frequency
> > should be close to 1 and 6^9=10077696....
>
> The factor of six is applied once for an entire SCC, so we'd reach this
> huge number only if there was a chain of nine different recursive
> functions - with this patch we assume each one will recurse six times,
> so the result is indeed a huge execution count estimate.
>
> The constant is not used for the "self generated" values like those in
> exchange, those are handled by the else branch below. For those we
> expect the recursion happens 8 times, because that is how many values we
> generate, but the boost is different depending on the recursion depth.
>
> >
> > I think it would be more robust to simply assume that the job will
> >distribute evenly across the clones. How hard is to implement that?
>
> This is not an update of counters. The code tries to estimate execution
> time improvement that is will be possible in callees if we clone for
> this particular value and so is based on call graph edge frequencies (so
> that if in a callee we can save 5 units of time and the frequency is 5,
> we estimate we will save 25). The code has the advantage that it is
> universal for both situations when profile feedback is and is not
> available.
I guess the patch is OK then.
Thanks,
Honza
>
> Martin
>
next prev parent reply other threads:[~2021-10-07 15:25 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 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 [this message]
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
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-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=20211007152524.GE67653@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=luoxhu@linux.ibm.com \
--cc=mjambor@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).