From: Feng Xue OS <fxue@os.amperecomputing.com>
To: Jan Hubicka <hubicka@ucw.cz>, "mjambor@suse.cz" <mjambor@suse.cz>
Cc: luoxhu <luoxhu@linux.ibm.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Ping: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)
Date: Fri, 22 Nov 2019 05:26:00 -0000 [thread overview]
Message-ID: <BYAPR01MB48699E8FA7BFB3D4047BE7DBF7490@BYAPR01MB4869.prod.exchangelabs.com> (raw)
In-Reply-To: <BYAPR01MB48693989F2EBD2D2B62AB25CF7700@BYAPR01MB4869.prod.exchangelabs.com>
Honza, Martin,
Hope your more comments on this patch. Not sure you base option on it. I think this can be a start point for
recursive versioning. And later we definitely need further cost-model tuning not only on this, but also whole
ipa-cp to enable more aggressive cloning.
Thanks,
Feng
________________________________________
From: Feng Xue OS <fxue@os.amperecomputing.com>
Sent: Friday, November 15, 2019 11:32 PM
To: Jan Hubicka
Cc: luoxhu; gcc-patches@gcc.gnu.org; Martin Jambor
Subject: Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)
Honza,
I made some changes: do not penalize self-recursive function, and add --param ipa-cp-min-recursive-probability, similar to recursive inline. Please review this new one.
Thanks,
Feng
________________________________________
From: Jan Hubicka <hubicka@ucw.cz>
Sent: Friday, November 15, 2019 4:33 AM
To: Feng Xue OS
Cc: luoxhu; gcc-patches@gcc.gnu.org; Martin Jambor
Subject: Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)
> >> Cost model used by self-recursive cloning is mainly based on existing stuffs
> >> in ipa-cp cloning, size growth and time benefit are considered. But since
> >> recursive cloning is a more aggressive cloning, we will actually have another
> >> problem, which is opposite to your concern. By default, current parameter
> >> set used to control ipa-cp and recursive-inliner gives priority to code size,
> >> not completely for performance. This makes ipa-cp behave somewhat
>
> > Yes, for a while the cost model is quite off. On Firefox it does just
> > few clonings where code size increases so it desprately needs retuning.
>
> > But since rescursive cloning is quite a different case from normal one,
> > perhaps having independent set of limits would help in particular ...
> I did consider this way, but this seems to be contradictory for normal
> and recursive cloning.
We could definitly discuss cost model incrementally. It is safe to do
what you do currently (rely on the existing ipa-cp's overconservative
heuristics).
>
> > > Do you have some data on code size/performance effects of this change?
> > For spec2017, no obvious code size and performance change with default setting.
> > Specifically, for exchange2, with ipa-cp-eval-threshold=1 and ipcp-unit-growth=80,
> > performance +31%, size +7%, on aarch64.
>
> > ... it will help here since ipa-cp-eval-threshold value needed are quite off of what we need to do.
>
> > I wonder about the 80% of unit growth which is also more than we can
> > enable by default. How it comes the overal size change is only 7%?
> 343624 -> 365632 (this contains debug info, -g) recursion-depth=8
> 273488 -> 273760 (no debug info) recursion-depth=8
What seems bit odd is that ipcp's metrics ends up with 80% code growth.
I will try to look into it and see if I can think better what to do
about the costs.
Honza
next prev parent reply other threads:[~2019-11-22 3:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 8:35 Feng Xue OS
2019-10-18 2:12 ` luoxhu
2019-10-18 5:15 ` Feng Xue OS
2019-10-24 6:17 ` luoxhu
2019-10-24 6:57 ` Feng Xue OS
2019-11-14 13:29 ` Jan Hubicka
2019-11-14 15:16 ` Feng Xue OS
2019-11-14 15:28 ` Jan Hubicka
2019-11-14 16:02 ` Feng Xue OS
2019-11-14 20:50 ` Jan Hubicka
2019-11-15 15:37 ` Feng Xue OS
2019-11-22 5:26 ` Feng Xue OS [this message]
2019-11-22 11:34 ` Martin Jambor
2019-11-25 14:17 ` Feng Xue OS
2019-11-27 2:07 ` Feng Xue OS
2019-11-27 15:12 ` Jan Hubicka
2019-11-28 3:48 ` Feng Xue OS
2019-12-01 23:20 ` Jeff Law
2019-12-02 7:07 ` Feng Xue OS
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=BYAPR01MB48699E8FA7BFB3D4047BE7DBF7490@BYAPR01MB4869.prod.exchangelabs.com \
--to=fxue@os.amperecomputing.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--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).