Hi,
this is another case where we can save quite some sreal operations
(because it is common that call frequency is the same as entry block bb
frequency)

Bootstrapped/regtested x86_64-linux, comitted.

Honza

        * profile-count.c (profile_count::to_sreal_scale): Short circuit
        case where profiles are same.
Index: profile-count.c
===================================================================
--- profile-count.c     (revision 278020)
+++ profile-count.c     (working copy)
@@ -312,6 +312,8 @@ profile_count::to_sreal_scale (profile_c
     *known = true;
   if (*this == zero ())
     return 0;
+  if (m_val == in.m_val)
+    return 1;
 
   if (!in.m_val)
     {

Reply via email to