aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-06-10 09:39:34 +0200
committerMartin Liska <marxin@gcc.gnu.org>2019-06-10 07:39:34 +0000
commit74ac8f1fe98b5126b291b2693e25d99b52f68c58 (patch)
treebaf904bbafbc9b65df109203f8cb88fb38910423
parent6cea7e397693c3fb2e77b6f9d7770fecc15fd204 (diff)
downloadgcc-74ac8f1fe98b5126b291b2693e25d99b52f68c58.zip
gcc-74ac8f1fe98b5126b291b2693e25d99b52f68c58.tar.gz
gcc-74ac8f1fe98b5126b291b2693e25d99b52f68c58.tar.bz2
Update a bit dump format.
2019-06-10 Martin Liska <mliska@suse.cz> * value-prof.c (dump_histogram_value): Change dump format. (gimple_mod_subtract_transform): Remove legacy comment. From-SVN: r272108
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/value-prof.c16
2 files changed, 14 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c463b68..53547c8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2019-06-10 Martin Liska <mliska@suse.cz>
+ * value-prof.c (dump_histogram_value): Change dump format.
+ (gimple_mod_subtract_transform): Remove legacy comment.
+
+2019-06-10 Martin Liska <mliska@suse.cz>
+
* value-prof.c (dump_histogram_value): Print histogram values
only if present.
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index 28fbec0..57ef9e4 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -230,18 +230,21 @@ dump_histogram_value (FILE *dump_file, histogram_value hist)
case HIST_TYPE_INTERVAL:
if (hist->hvalue.counters)
{
- fprintf (dump_file, "Interval counter range %d -- %d",
+ fprintf (dump_file, "Interval counter range [%d,%d]: [",
hist->hdata.intvl.int_start,
(hist->hdata.intvl.int_start
+ hist->hdata.intvl.steps - 1));
unsigned int i;
- fprintf (dump_file, " [");
for (i = 0; i < hist->hdata.intvl.steps; i++)
- fprintf (dump_file, " %d:%" PRId64,
- hist->hdata.intvl.int_start + i,
- (int64_t) hist->hvalue.counters[i]);
- fprintf (dump_file, " ] outside range:%" PRId64 ".\n",
+ {
+ fprintf (dump_file, "%d:%" PRId64,
+ hist->hdata.intvl.int_start + i,
+ (int64_t) hist->hvalue.counters[i]);
+ if (i != hist->hdata.intvl.steps - 1)
+ fprintf (dump_file, ", ");
+ }
+ fprintf (dump_file, "] outside range: %" PRId64 ".\n",
(int64_t) hist->hvalue.counters[i]);
}
break;
@@ -1112,7 +1115,6 @@ gimple_mod_subtract_transform (gimple_stmt_iterator *si)
count1 = histogram->hvalue.counters[0];
count2 = histogram->hvalue.counters[1];
- /* Compute probability of taking the optimal path. */
if (check_counter (stmt, "interval", &count1, &all, gimple_bb (stmt)->count))
{
gimple_remove_histogram_value (cfun, stmt, histogram);