Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-12-01 Thread Feng Xue OS
Done. -Thanks Feng From: Jeff Law Sent: Monday, December 2, 2019 4:33 AM To: Feng Xue OS; Martin Jambor; Jan Hubicka; Richard Biener Cc: luoxhu; gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Support multi-versioning on self-recursive function (ipa

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-12-01 Thread Jeff Law
On 11/26/19 6:44 PM, Feng Xue OS wrote: > Hi, Richard, > > This patch is a not bugfix, while it is small. Martin and Honza are fine > with it. > But now we are in stage 3, is it ok to commit? Yes. It was posted well in advance of the stage1->stage3 change. Please commit it ASAP so the testers

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-27 Thread Feng Xue OS
Subject: Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133) > 2019-11-15 Feng Xue > > PR ipa/92133 > * doc/invoke.texi (ipa-cp-max-recursive-depth): Document new option. > (ipa-cp-min-recursive-probability): Likewise. > * para

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-27 Thread Jan Hubicka
> 2019-11-15 Feng Xue > > PR ipa/92133 > * doc/invoke.texi (ipa-cp-max-recursive-depth): Document new option. > (ipa-cp-min-recursive-probability): Likewise. > * params.opt (ipa-cp-max-recursive-depth): New. > (ipa-cp-min-recursive-probability): Likewise.

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-26 Thread Feng Xue OS
: luoxhu; gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133) Martin, Thanks for your review. I updated the patch with your comments. Feng --- 2019-11-15 Feng Xue PR ipa/92133 * doc/invoke.texi (ipa-cp-max-recursive

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-25 Thread Feng Xue OS
Martin, Thanks for your review. I updated the patch with your comments. Feng --- 2019-11-15 Feng Xue PR ipa/92133 * doc/invoke.texi (ipa-cp-max-recursive-depth): Document new option. (ipa-cp-min-recursive-probability): Likewise. * params.opt (ipa-cp-max-recu

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-22 Thread Martin Jambor
Hi, On Fri, Nov 15 2019, Feng Xue OS wrote: > 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. The patch and its effect on exchange is intriguing, I only have a f

Ping: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-21 Thread Feng Xue OS
From: Feng Xue OS 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

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-15 Thread Feng Xue OS
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

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-14 Thread Jan Hubicka
> >> 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 con

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-14 Thread Feng Xue OS
>> 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, c

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-14 Thread Jan Hubicka
> Thanks for your review. > > > In general the patch looks good to me, but I would like Martin Jambor to > > comment on the ipa-prop/cp interfaces. However... > > > +@item ipa-cp-max-recursion-depth > > +Maximum depth of recursive cloning for self-recursive function. > > + > > > ... I believe we

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-14 Thread Feng Xue OS
Thanks for your review. > In general the patch looks good to me, but I would like Martin Jambor to > comment on the ipa-prop/cp interfaces. However... > +@item ipa-cp-max-recursion-depth > +Maximum depth of recursive cloning for self-recursive function. > + > ... I believe we will need more care

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-14 Thread Jan Hubicka
Hi, I think the patch generally looks reasonable +2019-11-13 Feng Xue + + PR ipa/92133 + * doc/invoke.texi (ipa-cp-max-recursion-depth): Document new option. + * params.opt (ipa-cp-max-recursion-depth): New. + * ipa-cp.c (ipcp_lattice::add_value): Add two new parameters +

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-10-23 Thread Feng Xue OS
, October 24, 2019 1:44 PM To: Feng Xue OS; gcc-patches@gcc.gnu.org; Jan Hubicka; Martin Jambor Subject: Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133) Hi, On 2019/10/17 16:23, Feng Xue OS wrote: > IPA does not allow constant propagation on parameter that is used to cont

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-10-23 Thread luoxhu
Hi, On 2019/10/17 16:23, Feng Xue OS wrote: > IPA does not allow constant propagation on parameter that is used to control > function recursion. > > recur_fn (i) > { >if ( !terminate_recursion (i)) > { >... >recur_fn (i + 1); >... > } >... > } > > This

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-10-17 Thread Feng Xue OS
> I noticed similar issue when analyzing the SPEC, self-recursive function is > not versioned and posted my observations in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92074. > Generally, this could be implemented well by your patch, while I am > wondering whether it is OK to convert the recur

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-10-17 Thread luoxhu
Hi Feng, On 2019/10/17 16:23, Feng Xue OS wrote: > IPA does not allow constant propagation on parameter that is used to control > function recursion. > > recur_fn (i) > { >if ( !terminate_recursion (i)) > { >... >recur_fn (i + 1); >... > } >... > } > > T

[PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-10-17 Thread Feng Xue OS
IPA does not allow constant propagation on parameter that is used to control function recursion. recur_fn (i) { if ( !terminate_recursion (i)) { ... recur_fn (i + 1); ... } ... } This patch is composed to enable multi-versioning for self-recursive function, and ve