mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-09 00:41:03 +08:00
profile-count.h (profile_count::split): Give better result when splitting profile_probability::always.
* profile-count.h (profile_count::split): Give better result when splitting profile_probability::always. From-SVN: r266584
This commit is contained in:
parent
c3cc0122ca
commit
f0dbeec7c5
@ -1,3 +1,8 @@
|
||||
2018-11-28 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* profile-count.h (profile_count::split): Give better result when
|
||||
splitting profile_probability::always.
|
||||
|
||||
2018-11-28 Vladimir Makarov <vmakarov@redhat.com>
|
||||
|
||||
PR target/88207
|
||||
|
@ -447,8 +447,12 @@ public:
|
||||
{
|
||||
profile_probability ret = *this * cprob;
|
||||
/* The following is equivalent to:
|
||||
*this = cprob.invert () * *this / ret.invert (); */
|
||||
*this = (*this - ret) / ret.invert ();
|
||||
*this = cprob.invert () * *this / ret.invert ();
|
||||
Avoid scaling when overall outcome is supposed to be always.
|
||||
Without knowing that one is inverse of toher, the result would be
|
||||
conservative. */
|
||||
if (!(*this == profile_probability::always ()))
|
||||
*this = (*this - ret) / ret.invert ();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user