===================================================================
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3.
#include "timevar.h"
#include "diagnostic-core.h"
#include "cfgloop.h"
+#include "pretty-print.h"
/* A pointer to one of the hooks containers. */
static struct cfg_hooks *cfg_hooks;
@@ -308,6 +309,10 @@ dump_bb_for_graph (pretty_printer *pp, b
if (!cfg_hooks->dump_bb_for_graph)
internal_error ("%s does not support dump_bb_for_graph",
cfg_hooks->name);
+ if (bb->count)
+ pp_printf (pp, "COUNT:" HOST_WIDEST_INT_PRINT_DEC, bb->count);
+ pp_printf (pp, " FREQ:%i |", bb->frequency);
+ pp_write_text_to_stream (pp);
cfg_hooks->dump_bb_for_graph (pp, bb);
}
===================================================================
@@ -155,11 +155,12 @@ draw_cfg_node_succ_edges (pretty_printer
pp_printf (pp,
"\tfn_%d_basic_block_%d:s -> fn_%d_basic_block_%d:n "
- "[style=%s,color=%s,weight=%d,constraint=%s];\n",
+ "[style=%s,color=%s,weight=%d,constraint=%s,
label=\"[%i%%]\"];\n",
funcdef_no, e->src->index,
funcdef_no, e->dest->index,
style, color, weight,
- (e->flags & (EDGE_FAKE | EDGE_DFS_BACK)) ? "false" : "true");
+ (e->flags & (EDGE_FAKE | EDGE_DFS_BACK)) ? "false" : "true",
+ e->probability * 100 / REG_BR_PROB_BASE);
}
pp_flush (pp);
}
===================================================================
@@ -3123,7 +3123,7 @@ cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) co
$(GGC_H) $(OBSTACK_H) alloc-pool.h $(HASH_TABLE_H) $(CFGLOOP_H) $(TREE_H) \
$(BASIC_BLOCK_H)
cfghooks.o: cfghooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TIMEVAR_H) toplev.h
$(DIAGNOSTIC_CORE_H) $(CFGLOOP_H)
+ $(TREE_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TIMEVAR_H) toplev.h
$(DIAGNOSTIC_CORE_H) $(CFGLOOP_H) $(PRETTY_PRINT_H)
cfgexpand.o : cfgexpand.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \