aboutsummaryrefslogtreecommitdiff
path: root/gcc/profile-count.h
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-12-08 12:27:28 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2017-12-08 11:27:28 +0000
commitf6422f23bba3ef7a6ed0fcf9525ad7c92d1905aa (patch)
tree04b3b1dbe61a5e583aa434041886ebd77afd6abd /gcc/profile-count.h
parentb1cf82933e894cbdb21d63653c20258dc8c87997 (diff)
downloadgcc-f6422f23bba3ef7a6ed0fcf9525ad7c92d1905aa.zip
gcc-f6422f23bba3ef7a6ed0fcf9525ad7c92d1905aa.tar.gz
gcc-f6422f23bba3ef7a6ed0fcf9525ad7c92d1905aa.tar.bz2
re PR tree-optimization/83609 (ICE in read_complex_part at gcc/expr.c:3202)
* profile-count.c (profile_count::from_gcov_type): Move from profile-count.h; handle overflow. * profile-count. (profile_count::from_gcov_type): Move offline. PR middle-end/83609 * gcc.c-torture/compile/pr83069.c: New testcase. From-SVN: r255507
Diffstat (limited to 'gcc/profile-count.h')
-rw-r--r--gcc/profile-count.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/gcc/profile-count.h b/gcc/profile-count.h
index 2ffa33f..75456ad 100644
--- a/gcc/profile-count.h
+++ b/gcc/profile-count.h
@@ -667,18 +667,6 @@ public:
return c;
}
- /* The profiling runtime uses gcov_type, which is usually 64bit integer.
- Conversions back and forth are used to read the coverage and get it
- into internal representation. */
- static profile_count from_gcov_type (gcov_type v)
- {
- profile_count ret;
- gcc_checking_assert (v >= 0 && (uint64_t) v <= max_count);
- ret.m_val = v;
- ret.m_quality = profile_precise;
- return ret;
- }
-
/* Conversion to gcov_type is lossy. */
gcov_type to_gcov_type () const
{
@@ -1083,6 +1071,11 @@ public:
global0. */
profile_count combine_with_ipa_count (profile_count ipa);
+ /* The profiling runtime uses gcov_type, which is usually 64bit integer.
+ Conversions back and forth are used to read the coverage and get it
+ into internal representation. */
+ static profile_count from_gcov_type (gcov_type v);
+
/* LTO streaming support. */
static profile_count stream_in (struct lto_input_block *);
void stream_out (struct output_block *);