/* Calculate branch probabilities, and basic block execution counts.
- Copyright (C) 1990-2014 Free Software Foundation, Inc.
+ Copyright (C) 1990-2015 Free Software Foundation, Inc.
Contributed by James E. Wilson, UC Berkeley/Cygnus Support;
based on some ideas from Dain Samples of UC Berkeley.
Further mangling by Bob Manson, Cygnus Support.
#include "rtl.h"
#include "flags.h"
#include "regs.h"
-#include "expr.h"
+#include "symtab.h"
+#include "hard-reg-set.h"
#include "function.h"
+#include "alias.h"
+#include "tree.h"
+#include "insn-config.h"
+#include "expmed.h"
+#include "dojump.h"
+#include "explow.h"
+#include "calls.h"
+#include "emit-rtl.h"
+#include "varasm.h"
+#include "stmt.h"
+#include "expr.h"
+#include "predict.h"
+#include "dominance.h"
+#include "cfg.h"
+#include "cfganal.h"
#include "basic-block.h"
#include "diagnostic-core.h"
#include "coverage.h"
#include "value-prof.h"
-#include "tree.h"
+#include "fold-const.h"
#include "tree-ssa-alias.h"
#include "internal-fn.h"
#include "gimple-expr.h"
-#include "is-a.h"
#include "gimple.h"
#include "gimple-iterator.h"
#include "tree-cfg.h"
static int total_hist_br_prob[20];
static int total_num_branches;
+/* Helper function to update gcov_working_sets. */
+
+void add_working_set (gcov_working_set_t *set) {
+ int i = 0;
+ for (; i < NUM_GCOV_WORKING_SETS; i++)
+ gcov_working_sets[i] = set[i];
+}
+
/* Forward declarations. */
static void find_spanning_tree (struct edge_list *);
ws_info = &gcov_working_sets[ws_ix];
/* Print out the percentage using int arithmatic to avoid float. */
fprintf (dump_file, "\t\t%u.%02u%%: num counts=%u, min counter="
- "%"PRId64 "\n",
+ "%" PRId64 "\n",
pct / 100, pct - (pct / 100 * 100),
ws_info->num_counters,
(int64_t)ws_info->min_counter);
if (dump_file)
{
fprintf (dump_file,
- "Edge %i->%i is inconsistent, count%"PRId64,
+ "Edge %i->%i is inconsistent, count%" PRId64,
e->src->index, e->dest->index, e->count);
dump_bb (dump_file, e->src, 0, TDF_DETAILS);
dump_bb (dump_file, e->dest, 0, TDF_DETAILS);
if (dump_file)
{
fprintf (dump_file, "BB %i count is negative "
- "%"PRId64,
+ "%" PRId64,
bb->index,
bb->count);
dump_bb (dump_file, bb, 0, TDF_DETAILS);
if (dump_file)
{
fprintf (dump_file, "BB %i count does not match sum of incoming edges "
- "%"PRId64" should be %"PRId64,
+ "%" PRId64" should be %" PRId64,
bb->index,
bb->count,
sum_edge_counts (bb->preds));
if (dump_file)
{
fprintf (dump_file, "BB %i count does not match sum of outgoing edges "
- "%"PRId64" should be %"PRId64,
+ "%" PRId64" should be %" PRId64,
bb->index,
bb->count,
sum_edge_counts (bb->succs));
{
fprintf (dump_file, "\nRead edge from %i to %i, count:",
bb->index, e->dest->index);
- fprintf (dump_file, "%"PRId64,
+ fprintf (dump_file, "%" PRId64,
(int64_t) e->count);
}
}