From: Jan Hubicka Date: Sat, 2 Dec 2017 09:48:24 +0000 (+0100) Subject: ipa-cp.c (ipcp_lattice::print): Update dumping. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e3951b03376718fb739661420dffea9de1edbcfa;p=gcc.git ipa-cp.c (ipcp_lattice::print): Update dumping. * ipa-cp.c (ipcp_lattice::print): Update dumping. (update_specialized_profile): Fix updating of counts. (perhaps_add_new_callers): Likewise. From-SVN: r255358 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8bbf08098f7..367dcb14828 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-12-01 Jan Hubicka + + * ipa-cp.c (ipcp_lattice::print): Update dumping. + (update_specialized_profile): Fix updating of counts. + (perhaps_add_new_callers): Likewise. + 2017-12-01 Jan Hubicka PR target/81616 diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 144762cf5e2..b6b1fefe9bc 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -497,8 +497,8 @@ ipcp_lattice::print (FILE * f, bool dump_sources, bool dump_benefits) fprintf (f, " [from:"); for (s = val->sources; s; s = s->next) - fprintf (f, " %i(%i)", s->cs->caller->order, - s->cs->frequency ()); + fprintf (f, " %i(%f)", s->cs->caller->order, + s->cs->sreal_frequency ().to_double ()); fprintf (f, "]"); } @@ -3751,10 +3751,7 @@ update_specialized_profile (struct cgraph_node *new_node, orig_node->count -= redirected_sum; for (cs = new_node->callees; cs; cs = cs->next_callee) - if (cs->frequency ()) - cs->count += cs->count.apply_scale (redirected_sum, new_node_count); - else - cs->count = profile_count::zero (); + cs->count += cs->count.apply_scale (redirected_sum, new_node_count); for (cs = orig_node->callees; cs; cs = cs->next_callee) { @@ -4482,7 +4479,7 @@ perhaps_add_new_callers (cgraph_node *node, ipcp_value *val) } } - if (redirected_sum > profile_count::zero ()) + if (redirected_sum.nonzero_p ()) update_specialized_profile (val->spec_node, node, redirected_sum); }