X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fstat%2Fdags.c;h=debb813bc731fd183de0b1c0226dbbfebdd7e67b;hb=e1c05b012f012400bf9f3b807b11fb6eafd3b99b;hp=42c2be9ced3b178e03e7dc85b161cebba36e8535;hpb=0fbcef83aa6060534172bb13e71cdadb04428806;p=libfirm diff --git a/ir/stat/dags.c b/ir/stat/dags.c index 42c2be9ce..debb813bc 100644 --- a/ir/stat/dags.c +++ b/ir/stat/dags.c @@ -108,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; @@ -378,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) { @@ -386,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, @@ -398,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