diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-11-09 15:05:14 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-11-09 14:05:14 +0000 |
commit | e4373d41d67060e14bab0c984fb9f7cbc4c93f1b (patch) | |
tree | fb9d5143e4e5fd9e929fbb4c13e3bd4b71aaaa40 /gcc/ipa-inline-transform.c | |
parent | a3a6d41f4610c67b9905b3796e441397cc240178 (diff) | |
download | gcc-e4373d41d67060e14bab0c984fb9f7cbc4c93f1b.zip gcc-e4373d41d67060e14bab0c984fb9f7cbc4c93f1b.tar.gz gcc-e4373d41d67060e14bab0c984fb9f7cbc4c93f1b.tar.bz2 |
re PR ipa/82879 (ICE in max, at profile-count.h:889)
PR ipa/82879
* ipa-inline-transform.c (update_noncloned_frequencies): Use
profile_count::adjust_for_ipa_scaling.
* tree-inline.c (copy_bb, copy_cfg_body): Likewise.
* profile-count.c (profile_count::adjust_for_ipa_scaling): New member
function.
* profile-count.h (profile_count::adjust_for_ipa_scaling): Declare.
From-SVN: r254582
Diffstat (limited to 'gcc/ipa-inline-transform.c')
-rw-r--r-- | gcc/ipa-inline-transform.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index e367df7..b2363e2 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -60,17 +60,7 @@ update_noncloned_frequencies (struct cgraph_node *node, { struct cgraph_edge *e; - /* We always must scale to be sure counters end up compatible. - If den is zero, just force it nonzero and hope for reasonable - approximation. - When num is forced nonzero, also update den, so we do not scale profile - to 0. */ - if (!(num == den) - && !(den.force_nonzero () == den)) - { - den = den.force_nonzero (); - num = num.force_nonzero (); - } + profile_count::adjust_for_ipa_scaling (&num, &den); /* We do not want to ignore high loop nest after freq drops to 0. */ if (!freq_scale) |