X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Fstat%2Fdags.c;h=debb813bc731fd183de0b1c0226dbbfebdd7e67b;hb=e1c05b012f012400bf9f3b807b11fb6eafd3b99b;hp=d52a702fd3b57a913fef66ec37d8c268699b4417;hpb=4b1138a9eee25ce11adbb7d7162eaa49421e8b51;p=libfirm diff --git a/ir/stat/dags.c b/ir/stat/dags.c index d52a702fd..debb813bc 100644 --- a/ir/stat/dags.c +++ b/ir/stat/dags.c @@ -23,9 +23,7 @@ * @author Michael Beck * @version $Id$ */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "config.h" #include @@ -110,8 +108,9 @@ static int is_arg(ir_node *node) /** * Allocate a new DAG entry. */ -static dag_entry_t *new_dag_entry(dag_env_t *dag_env, ir_node *node) { - dag_entry_t *entry = obstack_alloc(&dag_env->obst, sizeof(*entry)); +static dag_entry_t *new_dag_entry(dag_env_t *dag_env, ir_node *node) +{ + dag_entry_t *entry = OALLOC(&dag_env->obst, dag_entry_t); entry->num_nodes = 1; entry->num_roots = 1; @@ -380,7 +379,7 @@ void count_dags_in_graph(graph_entry_t *global, graph_entry_t *graph) /* connect and count them */ irg_walk_graph(graph->irg, connect_dags, NULL, &root_env); - printf("Graph %p %s --- %d\n", (void *)graph->irg, get_entity_name(get_irg_entity(graph->irg)), + printf("Graph %p %s --- %u\n", (void *)graph->irg, get_entity_name(get_irg_entity(graph->irg)), root_env.num_of_dags); for (id = 0, entry = root_env.list_of_dags; entry; entry = entry->next) { @@ -388,7 +387,7 @@ void count_dags_in_graph(graph_entry_t *global, graph_entry_t *graph) continue; entry->id = id++; - printf("number of roots %d number of nodes %d inner %d tree %u %ld\n", + printf("number of roots %u number of nodes %u inner %u tree %u %ld\n", entry->num_roots, entry->num_nodes, entry->num_inner_nodes, @@ -400,7 +399,7 @@ void count_dags_in_graph(graph_entry_t *global, graph_entry_t *graph) /* dump for test */ mark_options = root_env.options; set_dump_node_vcgattr_hook(stat_dag_mark_hook); - dump_ir_block_graph(graph->irg, "-dag"); + dump_ir_graph(graph->irg, "-dag"); set_dump_node_vcgattr_hook(NULL); #endif