projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved #ifdef DEBUG_libfirm commented members last in the structure
[libfirm]
/
ir
/
stat
/
dags.c
diff --git
a/ir/stat/dags.c
b/ir/stat/dags.c
index
3fa80b2
..
b14c990
100644
(file)
--- a/
ir/stat/dags.c
+++ b/
ir/stat/dags.c
@@
-18,6
+18,7
@@
#include "irprintf.h"
#include "irdump.h"
#include "dags.h"
#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
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 */
};
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;
/**
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 */
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;
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);
/* 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) {
root_env.num_of_dags);
for (id = 0, entry = root_env.list_of_dags; entry; entry = entry->next) {