public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Feng Xue OS <fxue@os.amperecomputing.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: Martin Jambor <mjambor@suse.cz>,
	Richard Biener	<richard.guenther@gmail.com>,
	luoxhu <luoxhu@linux.ibm.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)
Date: Thu, 28 Nov 2019 03:48:00 -0000	[thread overview]
Message-ID: <BYAPR01MB486968A75324502765733227F7470@BYAPR01MB4869.prod.exchangelabs.com> (raw)
In-Reply-To: <20191127142741.vi63rilojffo7vgh@kam.mff.cuni.cz>

Have no a complete idea for new cost model, but there are something we can try:
o.  adjust estimated profile for recursive function so that we can get a higher threshold.
o.  introduce a strength level for ipa-cp-clone, by default, it is same as current configuration,
and with larger number, ipa-cp works more aggressively.
o. integrate frequency information to computation of prop_time_benefit.

Feng

________________________________________
From: Jan Hubicka <hubicka@ucw.cz>
Sent: Wednesday, November 27, 2019 10:27 PM
To: Feng Xue OS
Cc: Martin Jambor; Richard Biener; luoxhu; gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

> 2019-11-15  Feng Xue <fxue@os.amperecomputing.com>
>
>         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.
>         * ipa-cp.c (ipcp_lattice<valtype>::add_value): Add two new parameters
>         val_p and unlimited.
>         (self_recursively_generated_p): New function.
>         (get_val_across_arith_op): Likewise.
>         (propagate_vals_across_arith_jfunc): Add constant propagation for
>         self-recursive function.
>         (incorporate_penalties): Do not penalize pure self-recursive function.
>         (good_cloning_opportunity_p): Dump node_is_self_scc flag.
>         (propagate_constants_topo): Set node_is_self_scc flag for cgraph node.
>         (get_info_about_necessary_edges): Relax hotness check for edge to
>         self-recursive function.
>         * ipa-prop.h (ipa_node_params): Add new field node_is_self_scc.

OK, thanks!
do you have some plans on the better cost model for the recursive
cloning? Also it would be nice to have this info available in recursive
inliner and give it a higher priority when inlining is going to turn
previously recrusive call into non-recursive.

Honza

  reply	other threads:[~2019-11-28  2:51 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                 ` Ping: " Feng Xue OS
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 [this message]
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=BYAPR01MB486968A75324502765733227F7470@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 \
    --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).