Remove wrong bail out in prune_topn_counter.

* libgcov-driver.c (prune_topn_counter): Remove
	check for -1 as we only prune run-time counters
	that do not generate an invalid state.
This commit is contained in:
Martin Liska 2020-01-23 14:34:59 +01:00
parent 14e5e74698
commit e9ee848dcd
No known key found for this signature in database
GPG Key ID: 4DC182DC0FA73785
2 changed files with 11 additions and 10 deletions

View File

@ -1,3 +1,9 @@
2020-01-23 Martin Liska <mliska@suse.cz>
* libgcov-driver.c (prune_topn_counter): Remove
check for -1 as we only prune run-time counters
that do not generate an invalid state.
2020-01-22 Martin Liska <mliska@suse.cz>
PR tree-optimization/92924

View File

@ -219,17 +219,12 @@ static struct gcov_fn_buffer *fn_buffer;
static void
prune_topn_counter (gcov_type *counters, gcov_type all)
{
if (counters[1] == -1)
return;
for (unsigned i = 0; i < GCOV_TOPN_VALUES; i++)
{
if (counters[2 * i + 1] < all)
{
counters[2 * i] = 0;
counters[2 * i + 1] = 0;
}
}
if (counters[2 * i + 1] < all)
{
counters[2 * i] = 0;
counters[2 * i + 1] = 0;
}
}
/* Prune counters so that they are ready to store or merge. */