diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-11-10 19:15:34 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-11-10 18:15:34 +0000 |
commit | 65eaab18b100ab83f1a05501e10b21875c72c299 (patch) | |
tree | 2fc3b47decdd1cbc3b1a95fc70be9d2fcfe63830 | |
parent | d07f74faa60a3604b14e1ad7c25ac983731f0394 (diff) | |
download | gcc-65eaab18b100ab83f1a05501e10b21875c72c299.zip gcc-65eaab18b100ab83f1a05501e10b21875c72c299.tar.gz gcc-65eaab18b100ab83f1a05501e10b21875c72c299.tar.bz2 |
Short circuit case where profiles are same.
* profile-count.c (profile_count::to_sreal_scale): Short circuit
case where profiles are same.
From-SVN: r278022
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/profile-count.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bdc3067..d2c7242 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-11-10 Jan Hubicka <hubicka@ucw.cz> + * profile-count.c (profile_count::to_sreal_scale): Short circuit + case where profiles are same. + +2019-11-10 Jan Hubicka <hubicka@ucw.cz> + * cgraph.c (cgraph_edge::maybe_hot_p): Do not use sreal_frequency. 2019-11-10 Jan Hubicka <hubicka@ucw.cz> diff --git a/gcc/profile-count.c b/gcc/profile-count.c index 6198675..6f6c0a9 100644 --- a/gcc/profile-count.c +++ b/gcc/profile-count.c @@ -312,6 +312,8 @@ profile_count::to_sreal_scale (profile_count in, bool *known) const *known = true; if (*this == zero ()) return 0; + if (m_val == in.m_val) + return 1; if (!in.m_val) { |