optimize_graph_df():
[libfirm] / ir / stat / pattern_dmp.c
index 2918b0d..3fb3f18 100644 (file)
 #endif
 
 #include <stdio.h>
-#include <stdlib.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
 
 #include "ident.h"
 #include "irop_t.h"
 #include "irmode.h"
-#include "firmstat.h"
+#include "firmstat_t.h"
 #include "pattern_dmp.h"
 
 /* dumper operations */
@@ -104,7 +106,7 @@ static void vcg_dump_new_pattern(pattern_dumper_t *self, counter_t *cnt)
   /** add a pseudo node */
   fprintf(priv->f,
     "     node: {title: \"c%u\" label: \"cnt: %u\" color:red }\n",
-    ++nr, cnt->cnt[0]
+    ++nr, cnt_to_uint(cnt)
   );
 }
 
@@ -192,7 +194,7 @@ static void stdout_dump_new_pattern(pattern_dumper_t *self, counter_t *cnt)
 {
   FILE *f = self->data;
 
-  fprintf(f, "%8u ", cnt->cnt[0]);
+  fprintf(f, "%8u ", cnt_to_uint(cnt));
 }
 
 
@@ -256,7 +258,7 @@ static void stdout_start_children(pattern_dumper_t *self, unsigned id)
 }
 
 /**
- * finishes childred  dumper
+ * finishes the children dumper
  */
 static void stdout_finish_children(pattern_dumper_t *self, unsigned id)
 {
@@ -340,7 +342,7 @@ void pattern_start_children(pattern_dumper_t *self, unsigned id)
 }
 
 /*
- * finishes childred dumper
+ * finishes the children dumper
  */
 void pattern_finish_children(pattern_dumper_t *self, unsigned id)
 {