diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-11-14 20:30:59 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-11-14 19:30:59 +0000 |
commit | 30632c7a9742ed959f85b33c6f57f9cc62c76630 (patch) | |
tree | 7bb5c9e5691559f32e7294b082d86fe3c868841f | |
parent | f021f1d3a65d46eb0d2d206d52343de79c124d57 (diff) | |
download | gcc-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
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ipa-fnsummary.c | 3 | ||||
-rw-r--r-- | gcc/ipa-inline.c | 5 |
3 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3cee433..a290ecb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-11-14 Jan Hubicka <hubicka@ucw.cz> + + * 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. + 2017-11-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c index ddc16bd..8e26e7e 100644 --- a/gcc/ipa-fnsummary.c +++ b/gcc/ipa-fnsummary.c @@ -2581,8 +2581,7 @@ estimate_edge_size_and_time (struct cgraph_edge *e, int *size, int *min_size, if (prob == REG_BR_PROB_BASE) *time += ((sreal)call_time) * e->sreal_frequency (); else - *time += ((sreal)call_time * prob) * e->sreal_frequency () - / CGRAPH_FREQ_BASE; + *time += ((sreal)call_time * prob) * e->sreal_frequency (); } 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, |