aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2019-12-01 15:12:52 +0000
committerJan Hubicka <hubicka@ucw.cz>2019-12-01 15:12:52 +0000
commit61363129642c89e90b694ee9b2c0e1b7b5bd6d66 (patch)
tree68bf46ff923ae479cfcb05008e4783470496b0d8
parent8aba59fcc0d6d4ad474c1695fb30eda2f781e932 (diff)
* profile-count.h (profile_count::operator<): Use IPA value for
comparsion. (profile_count::operator>): Likewise. (profile_count::operator<=): Likewise. (profile_count::operator>=): Likewise. * predict.c (maybe_hot_count_p): Do not convert to gcov_type. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278885 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/predict.c2
-rw-r--r--gcc/profile-count.h8
3 files changed, 14 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cc33a041090..0b012af497a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2019-11-30 Jan Hubicka <hubicka@ucw.cz>
+ * profile-count.h (profile_count::operator<): Use IPA value for
+ comparsion.
+ (profile_count::operator>): Likewise.
+ (profile_count::operator<=): Likewise.
+ (profile_count::operator>=): Likewise.
+ * predict.c (maybe_hot_count_p): Do not convert to gcov_type.
+
+2019-11-30 Jan Hubicka <hubicka@ucw.cz>
+
* ipa-inline.c (compute_max_insns): Return int64_t.
(inline_small_functions): Simplify.
diff --git a/gcc/predict.c b/gcc/predict.c
index 8c66a27d8b6..67f850de17a 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -184,7 +184,7 @@ maybe_hot_count_p (struct function *fun, profile_count count)
/* Code executed at most once is not hot. */
if (count <= MAX (profile_info ? profile_info->runs : 1, 1))
return false;
- return (count.to_gcov_type () >= get_hot_bb_threshold ());
+ return (count >= get_hot_bb_threshold ());
}
/* Return true if basic block BB of function FUN can be CPU intensive
diff --git a/gcc/profile-count.h b/gcc/profile-count.h
index 5a5c046005b..96145d51f2c 100644
--- a/gcc/profile-count.h
+++ b/gcc/profile-count.h
@@ -930,14 +930,14 @@ public:
{
gcc_checking_assert (ipa_p ());
gcc_checking_assert (other >= 0);
- return initialized_p () && m_val < (uint64_t) other;
+ return ipa ().initialized_p () && ipa ().m_val < (uint64_t) other;
}
bool operator> (const gcov_type other) const
{
gcc_checking_assert (ipa_p ());
gcc_checking_assert (other >= 0);
- return initialized_p () && m_val > (uint64_t) other;
+ return ipa ().initialized_p () && ipa ().m_val > (uint64_t) other;
}
bool operator<= (const profile_count &other) const
@@ -968,14 +968,14 @@ public:
{
gcc_checking_assert (ipa_p ());
gcc_checking_assert (other >= 0);
- return initialized_p () && m_val <= (uint64_t) other;
+ return ipa ().initialized_p () && ipa ().m_val <= (uint64_t) other;
}
bool operator>= (const gcov_type other) const
{
gcc_checking_assert (ipa_p ());
gcc_checking_assert (other >= 0);
- return initialized_p () && m_val >= (uint64_t) other;
+ return ipa ().initialized_p () && ipa ().m_val >= (uint64_t) other;
}
/* Return true when value is not zero and can be used for scaling.