> Hi Honza, > I have committed the typo fix as revision 266885. > Also I followed your suggestion (IIUC) by calling > profile_count::adjust_for_ipa_scaling for zero den in function > update_profiling_info. It works and does make more sense than > changing the global zero check logic. > Patch tested as before, is it ok?
Thanks, patch is OK. What is situation with AutoFDO now? It would be very nice to get it fixed for the release :) Honza > > Thanks, > bin > > diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c > index 4471bae11c7..5074ef63da1 100644 > --- a/gcc/ipa-cp.c > +++ b/gcc/ipa-cp.c > @@ -3715,9 +3715,11 @@ update_profiling_info (struct cgraph_node *orig_node, > new_sum = orig_node_count.combine_with_ipa_count (new_sum); > orig_node->count = remainder; > > + profile_count::adjust_for_ipa_scaling (&new_sum, &orig_node_count); > for (cs = new_node->callees; cs; cs = cs->next_callee) > cs->count = cs->count.apply_scale (new_sum, orig_node_count); > > + profile_count::adjust_for_ipa_scaling (&remainder, &orig_node_count); > for (cs = orig_node->callees; cs; cs = cs->next_callee) > cs->count = cs->count.apply_scale (remainder, orig_node_count); > > 2018-12-07 Bin Cheng <bin.ch...@linux.alibaba.com> > > * ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for > zero profile count.