aboutsummaryrefslogtreecommitdiff
path: root/gcc/profile-count.h
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/profile-count.h
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/profile-count.h')
-rw-r--r--gcc/profile-count.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/profile-count.h b/gcc/profile-count.h
index e63b964..aef9da3 100644
--- a/gcc/profile-count.h
+++ b/gcc/profile-count.h
@@ -351,6 +351,22 @@ public:
return profile_probability::always() - *this;
}
+ /* Return THIS with quality dropped to GUESSED. */
+ profile_probability guessed () const
+ {
+ profile_probability ret = *this;
+ ret.m_quality = profile_guessed;
+ return ret;
+ }
+
+ /* Return THIS with quality dropped to AFDO. */
+ profile_probability afdo () const
+ {
+ profile_probability ret = *this;
+ ret.m_quality = profile_afdo;
+ return ret;
+ }
+
profile_probability combine_with_freq (int freq1, profile_probability other,
int freq2) const
{
@@ -767,6 +783,22 @@ public:
return ret;
}
+ /* Return THIS with quality dropped to GUESSED. */
+ profile_count guessed () const
+ {
+ profile_count ret = *this;
+ ret.m_quality = profile_guessed;
+ return ret;
+ }
+
+ /* Return THIS with quality dropped to AFDO. */
+ profile_count afdo () const
+ {
+ profile_count ret = *this;
+ ret.m_quality = profile_afdo;
+ return ret;
+ }
+
/* Return probability of event with counter THIS within event with counter
OVERALL. */
profile_probability probability_in (const profile_count overall) const