From: Jan Hubicka Date: Sun, 10 Nov 2019 18:15:34 +0000 (+0100) Subject: Short circuit case where profiles are same. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=65eaab18b100ab83f1a05501e10b21875c72c299;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bdc3067e63c..d2c7242d794 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-11-10 Jan Hubicka + + * profile-count.c (profile_count::to_sreal_scale): Short circuit + case where profiles are same. + 2019-11-10 Jan Hubicka * cgraph.c (cgraph_edge::maybe_hot_p): Do not use sreal_frequency. diff --git a/gcc/profile-count.c b/gcc/profile-count.c index 6198675eb89..6f6c0a9e832 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) {