diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-11-13 18:23:25 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-11-13 17:23:25 +0000 |
commit | 41f0e8194de366399afb726a6862843d81f896a3 (patch) | |
tree | 6ecf459f42e8a834a49fe66dca8ae9575c9b5b31 /gcc/cgraph.c | |
parent | 8f2b097ed54816d28cd51254c8e4616404ae348e (diff) | |
download | gcc-41f0e8194de366399afb726a6862843d81f896a3.zip gcc-41f0e8194de366399afb726a6862843d81f896a3.tar.gz gcc-41f0e8194de366399afb726a6862843d81f896a3.tar.bz2 |
cgraph.c (cgraph_edge::sreal_frequency): New function.
* cgraph.c (cgraph_edge::sreal_frequency): New function.
* cgraph.h (cgraph_edge::sreal_frequency): Declare.
* ipa-fnsummary.c (dump_ipa_call_summary): Use sreal_frequency.
(estimate_edge_size_and_time): Likewise.
(ipa_merge_fn_summary_after_inlining): Likewise.
* ipa-inline.c (cgraph_freq_base_rec): Remove.
(compute_uninlined_call_time): Use sreal_frequency.
(compute_inlined_call_time): Likewise.
(ipa_inline): Do not initialize cgraph_freq_base_rec.
* profile-count.c: Include sreal.h.
(profile_count::to_sreal_scale): New.
* profile-count.h: Forward declare sreal.
(profile_count::to_sreal_scale): Declare.
From-SVN: r254696
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 83e496b..bc60fc9 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -3880,4 +3880,16 @@ cgraph_node::has_thunk_p (cgraph_node *node, void *) return false; } +/* Expected frequency of executions within the function. + When set to CGRAPH_FREQ_BASE, the edge is expected to be called once + per function call. The range is 0 to CGRAPH_FREQ_MAX. */ + +sreal +cgraph_edge::sreal_frequency () +{ + return count.to_sreal_scale (caller->global.inlined_to + ? caller->global.inlined_to->count + : caller->count); +} + #include "gt-cgraph.h" |