]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix overactive sanity check in profile_count::to_sreal_scale
authorJan Hubicka <jh@suse.cz>
Tue, 14 Mar 2023 08:10:35 +0000 (09:10 +0100)
committerJan Hubicka <jh@suse.cz>
Tue, 14 Mar 2023 08:10:35 +0000 (09:10 +0100)
commit5159a1f1e91e03d4b82808a0062697318232543f
treea428d749546ac50ad08aa387201fdcaba044bf89
parente17936f842d2885447b6b8b82c2fb9cbf2679d7e
Fix overactive sanity check in profile_count::to_sreal_scale

As discussed in the PR log, profile_count::to_cgraph_frequency was originally
intended to work across function boundary and has some extra logic and sanity
check for that.  It is used only within single function and with current
API it can not really work well globally, so this patch synchronizes its
implementation with probability_in which does similar job but to determine
relative probability.

gcc/ChangeLog:

2023-03-14  Jan Hubicka  <hubicka@ucw.cz>

PR tree-optimization/106896
* profile-count.cc (profile_count::to_sreal_scale): Synchronize
implementatoin with probability_in; avoid some asserts.
gcc/profile-count.cc