This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Another sreal micro optimization


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)
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]