aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-11-14 20:30:59 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2017-11-14 19:30:59 +0000
commit30632c7a9742ed959f85b33c6f57f9cc62c76630 (patch)
tree7bb5c9e5691559f32e7294b082d86fe3c868841f /gcc/ipa-inline.c
parentf021f1d3a65d46eb0d2d206d52343de79c124d57 (diff)
downloadgcc-30632c7a9742ed959f85b33c6f57f9cc62c76630.zip
gcc-30632c7a9742ed959f85b33c6f57f9cc62c76630.tar.gz
gcc-30632c7a9742ed959f85b33c6f57f9cc62c76630.tar.bz2
ipa-inline.c (edge_badness): Dump sreal frequency.
* ipa-inline.c (edge_badness): Dump sreal frequency. (compute_inlined_call_time): Match natural implementaiton ... * ipa-fnsummary.c (estimate_edge_size_and_time): ... here; remove forgotten division by CGRAPH_FREQ_BASE. From-SVN: r254738
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 91bf8e6..8d9ecb2 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -670,8 +670,7 @@ compute_inlined_call_time (struct cgraph_edge *edge,
/* This calculation should match one in ipa-inline-analysis.c
(estimate_edge_size_and_time). */
- time -= (sreal) edge->frequency ()
- * ipa_call_summaries->get (edge)->call_stmt_time / CGRAPH_FREQ_BASE;
+ time -= (sreal)ipa_call_summaries->get (edge)->call_stmt_time * freq;
time += caller_time;
if (time <= 0)
time = ((sreal) 1) >> 8;
@@ -1164,7 +1163,7 @@ edge_badness (struct cgraph_edge *edge, bool dump)
" overall growth %i (current) %i (original)"
" %i (compensated)\n",
badness.to_double (),
- (double)edge->frequency () / CGRAPH_FREQ_BASE,
+ edge->sreal_frequency ().to_double (),
edge->count.ipa ().initialized_p () ? edge->count.ipa ().to_gcov_type () : -1,
caller->count.ipa ().initialized_p () ? caller->count.ipa ().to_gcov_type () : -1,
compute_uninlined_call_time (edge,