+2017-12-08 Jan Hubicka <hubicka@ucw.cz>
+
+ PR middle-end/83609
+ * profile-count.c (profile_count::from_gcov_type): Move from
+ profile-count.h; handle overflow.
+ * profile-count.h (profile_count::from_gcov_type): Move offline.
+
2017-12-08 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/83304
return this->global0 ();
return this->global0adjusted ();
}
+
+/* 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. */
+profile_count
+profile_count::from_gcov_type (gcov_type v)
+ {
+ profile_count ret;
+ gcc_checking_assert (v >= 0);
+ if (dump_file && v >= (gcov_type)max_count)
+ fprintf (dump_file,
+ "Capping gcov count %" PRId64 " to max_count %" PRId64 "\n",
+ (int64_t) v, (int64_t) max_count);
+ ret.m_val = MIN (v, (gcov_type)max_count);
+ ret.m_quality = profile_precise;
+ return ret;
+ }
+
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
{
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 *);
+2017-12-08 Jan Hubicka <hubicka@ucw.cz>
+
+ PR middle-end/83609
+ * gcc.c-torture/compile/pr83069.c: New testcase.
+
2017-12-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/81303
--- /dev/null
+#define MAX 98
+
+void foo (unsigned long *res, unsigned long in)
+{
+ for (unsigned long a = 0; a < MAX; a++)
+ for (unsigned long b = 0; b < MAX; b++)
+ for (unsigned long c = 0; c < MAX; c++)
+ for (unsigned long d = 0; d < MAX; d++)
+ for (unsigned long e = 0; e < MAX; e++)
+ for (unsigned long f = 0; f < MAX; f++)
+ for (unsigned long g = 0; g < MAX; g++)
+ *res += a * in;
+}
+