ipa-cp: Improve updating behavior when profile counts have gone bad
Looking into the behavior of profile count updating in PR 107925, I
noticed that an option not considered possible was actually happening,
and - with the guesswork in place to distribute unexplained counts -
it simply can happen. Currently it is handled by dropping the counts
to local estimated zero, whereas it is probably better to leave the
count as they are but drop the category to GUESSED_GLOBAL0 - which is
what profile_count::combine_with_ipa_count in a similar case (or so I
hope :-)
gcc/ChangeLog:
2023-02-20 Martin Jambor <mjambor@suse.cz>
PR ipa/107925
* ipa-cp.cc (update_profiling_info): Drop counts of orig_node to
global0 instead of zeroing when it does not have as many counts as
it should.