cfgrtl.c (rtl_flow_call_edges_add): Update profile.
authorJan Hubicka <hubicka@ucw.cz>
Sat, 1 Jul 2017 12:31:25 +0000 (14:31 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 1 Jul 2017 12:31:25 +0000 (12:31 +0000)
* cfgrtl.c (rtl_flow_call_edges_add): Update profile.
* tree-cfg.c (gimple_flow_call_edges_add): Likewise.
* profile-count.h (max_safe_multiplier): Make unsigned.
(profile_count::guessed_zero): New.

From-SVN: r249869

gcc/ChangeLog
gcc/cfgrtl.c
gcc/profile-count.h
gcc/tree-cfg.c

index 4ad7c0094981ae40cc6135e2ee4e03723430a84b..85957034a3c407f0bd47cb721dd454647c5cc502 100644 (file)
@@ -1,3 +1,10 @@
+2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
+
+       * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
+       * tree-cfg.c (gimple_flow_call_edges_add): Likewise.
+       * profile-count.h (max_safe_multiplier): Make unsigned.
+       (profile_count::guessed_zero): New.
+
 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
 
        * bb-reorder.c (fix_up_crossing_landing_pad,
index f2a238c1d5d92fcbcb1cccb8f0a0829e646d7929..b0f9104ac12e999582f2adc4e1d0c2a0d01a372e 100644 (file)
@@ -4904,7 +4904,9 @@ rtl_flow_call_edges_add (sbitmap blocks)
                    blocks_split++;
                }
 
-             make_edge (bb, EXIT_BLOCK_PTR_FOR_FN (cfun), EDGE_FAKE);
+             edge ne = make_edge (bb, EXIT_BLOCK_PTR_FOR_FN (cfun), EDGE_FAKE);
+             ne->probability = profile_probability::guessed_never ();
+             ne->count = profile_count::guessed_zero ();
            }
 
          if (insn == BB_HEAD (bb))
index 6a1031531ff8a15134fe7b0c6680e6347e3dac88..73bc8ed0506bcd7e138185071efb6193b356936d 100644 (file)
@@ -506,7 +506,7 @@ class GTY(()) profile_count
   /* Assume numbers smaller than this to multiply.  This is set to make
      testsuite pass, in future we may implement precise multiplication in higer
      rangers.  */
-  static const int64_t max_safe_multiplier = 131072;
+  static const uint64_t max_safe_multiplier = 131072;
 public:
 
   /* Used for counters which are expected to be never executed.  */
@@ -514,6 +514,13 @@ public:
     {
       return from_gcov_type (0);
     }
+  static profile_count guessed_zero ()
+    {
+      profile_count c;
+      c.m_val = 0;
+      c.m_quality = profile_guessed;
+      return c;
+    }
   static profile_count one ()
     {
       return from_gcov_type (1);
index 848b20f90d2b52cbae2c54b8158cc58b9f0ff597..24b06b91bbbe2e75dbf1daf3778d64f8bee8d434 100644 (file)
@@ -8211,7 +8211,9 @@ gimple_flow_call_edges_add (sbitmap blocks)
                      if (e)
                        blocks_split++;
                    }
-                 make_edge (bb, EXIT_BLOCK_PTR_FOR_FN (cfun), EDGE_FAKE);
+                 e = make_edge (bb, EXIT_BLOCK_PTR_FOR_FN (cfun), EDGE_FAKE);
+                 e->probability = profile_probability::guessed_never ();
+                 e->count = profile_count::guessed_zero ();
                }
              gsi_prev (&gsi);
            }
@@ -8220,7 +8222,7 @@ gimple_flow_call_edges_add (sbitmap blocks)
     }
 
   if (blocks_split)
-    verify_flow_info ();
+    checking_verify_flow_info ();
 
   return blocks_split;
 }