* Inliner badness metric tweak
@ 2015-03-30 1:45 Jan Hubicka
2015-03-30 9:25 ` Richard Biener
2015-04-01 15:36 ` H.J. Lu
0 siblings, 2 replies; 4+ messages in thread
From: Jan Hubicka @ 2015-03-30 1:45 UTC (permalink / raw)
To: gcc-patches
Hi,
this patch makes inline metric to be
estimate_speedup
---------------------------- (over)
edge_growth^2*overall_growth
This is intended to make stronger push on inliner to preffer functions with
smaller growth and do not take overall growth (that is expected unit growth
after inlining all calls to a give function) so seriously.
This solve code size regression for tramp3d and also improve DLV. I tested it
on firefox with resonable results and on subset of SPEC that caused inliner
issues in past.
Lacking access to SUSE's periodic testers, I intend to commit it today and
watch them for possible regressions.
Bootstrapped/regtested x86_64-linux.
PR ipa/65076
* ipa-inline.c (edge_badness): Base denominator on callee's
grwoth squared.
Index: ipa-inline.c
===================================================================
--- ipa-inline.c (revision 221757)
+++ ipa-inline.c (working copy)
@@ -1099,7 +1099,7 @@ edge_badness (struct cgraph_edge *edge,
numerator = numerator >> 11;
denominator = growth;
if (callee_info->growth > 0)
- denominator *= callee_info->growth;
+ denominator *= callee_info->growth * callee_info->growth;
badness = - numerator / denominator;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Inliner badness metric tweak
2015-03-30 1:45 Inliner badness metric tweak Jan Hubicka
@ 2015-03-30 9:25 ` Richard Biener
2015-04-01 15:36 ` H.J. Lu
1 sibling, 0 replies; 4+ messages in thread
From: Richard Biener @ 2015-03-30 9:25 UTC (permalink / raw)
To: Jan Hubicka; +Cc: GCC Patches
On Mon, Mar 30, 2015 at 3:45 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> this patch makes inline metric to be
> estimate_speedup
> ---------------------------- (over)
> edge_growth^2*overall_growth
>
> This is intended to make stronger push on inliner to preffer functions with
> smaller growth and do not take overall growth (that is expected unit growth
> after inlining all calls to a give function) so seriously.
>
> This solve code size regression for tramp3d and also improve DLV. I tested it
> on firefox with resonable results and on subset of SPEC that caused inliner
> issues in past.
>
> Lacking access to SUSE's periodic testers, I intend to commit it today and
> watch them for possible regressions.
>
> Bootstrapped/regtested x86_64-linux.
>
> PR ipa/65076
> * ipa-inline.c (edge_badness): Base denominator on callee's
> grwoth squared.
>
> Index: ipa-inline.c
> ===================================================================
> --- ipa-inline.c (revision 221757)
> +++ ipa-inline.c (working copy)
> @@ -1099,7 +1099,7 @@ edge_badness (struct cgraph_edge *edge,
> numerator = numerator >> 11;
> denominator = growth;
> if (callee_info->growth > 0)
> - denominator *= callee_info->growth;
> + denominator *= callee_info->growth * callee_info->growth;
For sure a comment explaining this would be good ...
> badness = - numerator / denominator;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Inliner badness metric tweak
2015-03-30 1:45 Inliner badness metric tweak Jan Hubicka
2015-03-30 9:25 ` Richard Biener
@ 2015-04-01 15:36 ` H.J. Lu
2015-04-02 4:47 ` Jan Hubicka
1 sibling, 1 reply; 4+ messages in thread
From: H.J. Lu @ 2015-04-01 15:36 UTC (permalink / raw)
To: Jan Hubicka; +Cc: GCC Patches
On Sun, Mar 29, 2015 at 6:45 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> this patch makes inline metric to be
> estimate_speedup
> ---------------------------- (over)
> edge_growth^2*overall_growth
>
> This is intended to make stronger push on inliner to preffer functions with
> smaller growth and do not take overall growth (that is expected unit growth
> after inlining all calls to a give function) so seriously.
>
> This solve code size regression for tramp3d and also improve DLV. I tested it
> on firefox with resonable results and on subset of SPEC that caused inliner
> issues in past.
>
> Lacking access to SUSE's periodic testers, I intend to commit it today and
> watch them for possible regressions.
>
> Bootstrapped/regtested x86_64-linux.
>
> PR ipa/65076
> * ipa-inline.c (edge_badness): Base denominator on callee's
> grwoth squared.
This caused:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65654
--
H.J.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-02 4:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30 1:45 Inliner badness metric tweak Jan Hubicka
2015-03-30 9:25 ` Richard Biener
2015-04-01 15:36 ` H.J. Lu
2015-04-02 4:47 ` Jan Hubicka
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).