This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Do not convert to reg_br_prob_base in tree-ssa-threadupdate
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 16 Jul 2017 12:08:56 +0200
- Subject: Do not convert to reg_br_prob_base in tree-ssa-threadupdate
- Authentication-results: sourceware.org; auth=none
Hi,
this patch removes one unnecessary conversion to reg_br_prob_base arithmetics
which triggers ICE with profiled bootstrap in my tree.
profiledbootstrapped/regtested x86_64-linux, comitted.
* tree-ssa-threadupdate.c (compute_path_counts,
update_joiner_offpath_counts): Use profile_probability.
Index: tree-ssa-threadupdate.c
===================================================================
--- tree-ssa-threadupdate.c (revision 250226)
+++ tree-ssa-threadupdate.c (working copy)
@@ -763,8 +763,7 @@ compute_path_counts (struct redirection_
/* 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
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);