X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fstat%2Fdags.c;h=b14c990ff544fc27e00e3ee0e9e6f1af4d87906b;hb=6a768b09064c37b361871ba888213cdd5ed5a700;hp=3fa80b22b3682797b346a09e8c0960412e278912;hpb=d733876b06d9bacfc74e96f95058647d13b7e9e1;p=libfirm diff --git a/ir/stat/dags.c b/ir/stat/dags.c index 3fa80b22b..b14c990ff 100644 --- a/ir/stat/dags.c +++ b/ir/stat/dags.c @@ -18,6 +18,7 @@ #include "irprintf.h" #include "irdump.h" #include "dags.h" +#include "irtools.h" enum dag_counting_options_t { FIRMSTAT_COPY_CONSTANTS = 0x00000001, /**< if set, constants will be treated as they are in @@ -27,14 +28,6 @@ enum dag_counting_options_t { FIRMSTAT_ARGS_ARE_ROOTS = 0x00000008, /**< arguments (Proj(Proj(Start)) are roots */ }; -/** - * walker for clearing node links - */ -static void clear_links(ir_node *node, void *env) -{ - set_irn_link(node, NULL); -} - typedef struct _dag_entry_t dag_entry_t; /** @@ -264,7 +257,7 @@ void count_dags_in_graph(graph_entry_t *global, graph_entry_t *graph) return; /* first step, clear the links */ - irg_walk_graph(graph->irg, clear_links, NULL, NULL); + irg_walk_graph(graph->irg, firm_clear_link, NULL, NULL); obstack_init(&root_env.obst); root_env.num_of_dags = 0; @@ -274,7 +267,7 @@ void count_dags_in_graph(graph_entry_t *global, graph_entry_t *graph) /* count them */ irg_walk_graph(graph->irg, connect_dags, NULL, &root_env); - printf("Graph %p %s --- %d\n", graph->irg, get_entity_name(get_irg_entity(graph->irg)), + printf("Graph %p %s --- %d\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) {