tree-ssa-threadupdate.c (compute_path_counts, [...]): Use profile_probability.
authorJan Hubicka <hubicka@ucw.cz>
Sun, 16 Jul 2017 10:06:00 +0000 (12:06 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 16 Jul 2017 10:06:00 +0000 (10:06 +0000)
* tree-ssa-threadupdate.c (compute_path_counts,
update_joiner_offpath_counts): Use profile_probability.

From-SVN: r250233

gcc/ChangeLog
gcc/tree-ssa-threadupdate.c

index 31bb7de..9470e63 100644 (file)
@@ -1,3 +1,8 @@
+2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
+
+       * tree-ssa-threadupdate.c (compute_path_counts,
+       update_joiner_offpath_counts): Use profile_probability.
+
 2017-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
        Revert:
index 235a907..9da7467 100644 (file)
@@ -763,8 +763,7 @@ compute_path_counts (struct redirection_data *rd,
   /* Handle incoming profile insanities.  */
   if (total_count < path_in_count)
     path_in_count = total_count;
-  int onpath_scale
-        = path_in_count.probability_in (total_count).to_reg_br_prob_base ();
+  profile_probability onpath_scale = path_in_count.probability_in (total_count);
 
   /* Walk the entire path to do some more computation in order to estimate
      how much of the path_in_count will flow out of the duplicated threading
@@ -977,8 +976,8 @@ update_joiner_offpath_counts (edge epath, basic_block dup_bb,
         among the duplicated off-path edges based on their original
         ratio to the full off-path count (total_orig_off_path_count).
         */
-      int scale = enonpath->count.probability_in (total_orig_off_path_count)
-                       .to_reg_br_prob_base ();
+      profile_probability scale
+                = enonpath->count.probability_in (total_orig_off_path_count);
       /* Give the duplicated offpath edge a portion of the duplicated
         total.  */
       enonpathdup->count = total_dup_off_path_count.apply_probability (scale);