Fixed liveness in loops an phi functions.
[libfirm] / ir / be / bephiopt.c
index 7683ef8..8c14e5f 100644 (file)
@@ -2,6 +2,9 @@
  * @author Daniel Grund
  * @date 04.01.2005
  */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -14,6 +17,7 @@
 #include "irouts.h"
 #include "irdom.h"
 
+#include "beutil.h"
 #include "bera_t.h"
 #include "bephiopt.h"
 #include "phiclass_t.h"
@@ -30,7 +34,7 @@
 #define DUMP_DIR_PHI_STAT  1
 #define DUMP_ALL_PHI_STAT  1
 
-#define PHI_STAT_FILE "all.phistat"
+#define PHI_STAT_FILE "dir.phistat"
 #define ENV_PHI_STAT "PHI_STAT"
 
 static firm_dbg_module_t *dbgphi = NULL;
@@ -42,8 +46,9 @@ static void phi_node_walker(ir_node *node, void *env) {
 
 
 static void node_collector(ir_node *node, void *env) {
+       struct obstack *obst = env;
        if (!is_Block(node) && is_allocatable_irn(node))
-               obstack_ptr_grow(env, node);
+               obstack_ptr_grow(obst, node);
 }