#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
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;
/**
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;
/* 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) {