diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-11-29 11:29:44 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-11-29 10:29:44 +0000 |
commit | db51f624df2a965f70de70239c35e882b4897582 (patch) | |
tree | 25f8ed56b4c02634f18203902cde0e06f274974e /gcc/profile-count.c | |
parent | 60178a322b4e8d0dc6cf50f57f8fa1fdf624a1f0 (diff) | |
download | gcc-db51f624df2a965f70de70239c35e882b4897582.zip gcc-db51f624df2a965f70de70239c35e882b4897582.tar.gz gcc-db51f624df2a965f70de70239c35e882b4897582.tar.bz2 |
profile-count.c (profile_count::to_cgraph_frequency, [...]): Check for compaibility of counts.
* profile-count.c (profile_count::to_cgraph_frequency,
profile_count::to_sreal_scale): Check for compaibility of counts.
* profile-count.h (compatible_p): Make public; add checking for
global0 versus global types.
* cgraph.c (cgraph_node::verify_node): Verify count compatibility.
From-SVN: r278835
Diffstat (limited to 'gcc/profile-count.c')
-rw-r--r-- | gcc/profile-count.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/profile-count.c b/gcc/profile-count.c index fb978c6..81a9691 100644 --- a/gcc/profile-count.c +++ b/gcc/profile-count.c @@ -291,6 +291,7 @@ profile_count::to_cgraph_frequency (profile_count entry_bb_count) const return 0; gcc_checking_assert (entry_bb_count.initialized_p ()); uint64_t scale; + gcc_checking_assert (compatible_p (entry_bb_count)); if (!safe_scale_64bit (!entry_bb_count.m_val ? m_val + 1 : m_val, CGRAPH_FREQ_BASE, MAX (1, entry_bb_count.m_val), &scale)) return CGRAPH_FREQ_MAX; @@ -328,6 +329,7 @@ profile_count::to_sreal_scale (profile_count in, bool *known) const return 0; if (m_val == in.m_val) return 1; + gcc_checking_assert (compatible_p (in)); if (!in.m_val) { |