aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-07-03 16:40:46 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2017-07-03 14:40:46 +0000
commit2f70a97992aefc22b56cbee13ccd2bb04c6aaa6f (patch)
treeb971b49f4f54cce7db5fb1c43c9444677e53dbe9 /gcc/tree-ssa-threadupdate.c
parentd31415ba1989c3d51c536fbba6a976b527213e44 (diff)
downloadgcc-2f70a97992aefc22b56cbee13ccd2bb04c6aaa6f.zip
gcc-2f70a97992aefc22b56cbee13ccd2bb04c6aaa6f.tar.gz
gcc-2f70a97992aefc22b56cbee13ccd2bb04c6aaa6f.tar.bz2
re PR rtl-optimization/81290 (ICE in update_br_prob_note)
PR middle-end/81290 * predict.c (force_edge_cold): Be more careful about propagation backward. * profile-count.h (profile_probability::guessed, profile_probability::fdo, profile_count::guessed, profile_count::fdo): New. * tree-ssa-threadupdate.c (recompute_probabilities): Result is guessed. * gcc.c-torture/compile/pr81290.c: New. From-SVN: r249924
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index f5bc95f..235a907 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -908,7 +908,7 @@ recompute_probabilities (basic_block bb)
/* Prevent overflow computation due to insane profiles. */
if (esucc->count < bb->count)
- esucc->probability = esucc->count.probability_in (bb->count);
+ esucc->probability = esucc->count.probability_in (bb->count).guessed ();
else
/* Can happen with missing/guessed probabilities, since we
may determine that more is flowing along duplicated
@@ -1051,7 +1051,8 @@ freqs_to_counts_path (struct redirection_data *rd)
if (ein->probability.initialized_p ())
ein->count = profile_count::from_gcov_type
(apply_probability (ein->src->frequency * REG_BR_PROB_BASE,
- ein->probability.to_reg_br_prob_base ()));
+ ein->probability
+ .to_reg_br_prob_base ())).guessed ();
else
/* FIXME: this is hack; we should track uninitialized values. */
ein->count = profile_count::zero ();