Another sreal micro optimization
diff mbox series

Message ID 20191110181618.ask6pgrxhajx6usr@kam.mff.cuni.cz
State New
Headers show
Series
  • Another sreal micro optimization
Related show

Commit Message

Jan Hubicka Nov. 10, 2019, 6:16 p.m. UTC
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.

Patch
diff mbox series

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