From 0cea1d34f781ba9e08ffa82458f0410b398e9c93 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 14 Nov 2017 10:12:46 +0100 Subject: [PATCH] ipa-inline.c (compute_uninlined_call_time, [...]): always use frequencies. * ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time): always use frequencies. From-SVN: r254724 --- gcc/ChangeLog | 5 +++++ gcc/ipa-inline.c | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dbe4c055089..9740447ab98 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-11-13 Jan Hubicka + + * ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time): + always use frequencies. + 2017-11-13 Jan Hubicka * bb-reorder.c: Remove frequencies from comments. diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 8a2fd4baeeb..91bf8e67e8a 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -640,10 +640,6 @@ compute_uninlined_call_time (struct cgraph_edge *edge, ? edge->caller->global.inlined_to : edge->caller); - if (edge->count.ipa ().nonzero_p () - && caller->count.ipa ().nonzero_p ()) - uninlined_call_time *= (sreal)edge->count.ipa ().to_gcov_type () - / caller->count.ipa ().to_gcov_type (); sreal freq = edge->sreal_frequency (); if (freq != 0) uninlined_call_time *= freq; @@ -666,9 +662,6 @@ compute_inlined_call_time (struct cgraph_edge *edge, : edge->caller); sreal caller_time = ipa_fn_summaries->get (caller)->time; - if (edge->count.ipa ().nonzero_p () - && caller->count.ipa ().nonzero_p ()) - time *= (sreal)edge->count.to_gcov_type () / caller->count.to_gcov_type (); sreal freq = edge->sreal_frequency (); if (freq != 0) time *= freq; @@ -1954,7 +1947,7 @@ inline_small_functions (void) ? gimple_lineno ((const gimple *) edge->call_stmt) : -1, badness.to_double (), - edge->frequency () / (double)CGRAPH_FREQ_BASE); + edge->sreal_frequency ().to_double ()); if (edge->count.ipa ().initialized_p ()) { fprintf (dump_file, " Called "); -- 2.30.2