- moved the imul mem,imm32 splitting into peephole optimizations
[libfirm] / ir / opt / gvn_pre.c
index 927cc4b..87b0725 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
  * @version $Id$
  * @summary
  *
- * Currently completely broken because our stes so NOT preserve
+ * Currently completely broken because our sets do NOT preserve
  * the topological sort!
  */
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
 
+#include "iroptimize.h"
+
 #include <assert.h>
 
 #include "irgraph_t.h"
@@ -47,7 +49,6 @@
 #include "ircons.h"
 #include "irgmod.h"
 #include "debug.h"
-#include "gvn_pre.h"
 #include "xmalloc.h"
 
 /** The debug module handle. */
@@ -180,6 +181,7 @@ static int value_cmp(const void *elt, const void *key, size_t size)
 {
   const value_entry *e1 = elt;
   const value_entry *e2 = key;
+  (void) size;
 
   return identities_cmp(e1->value, e2->value);
 }
@@ -444,10 +446,12 @@ static ir_node *translate(ir_node *node, ir_node *block, int pos, pre_env *env)
        node might depend on that. */
     copy_node_attr(node, nn);
     res = node_add(env->trans_set, nn);
-    if (nn != res)
+    if (nn != res) {
       obstack_free(env->obst, nn);
-    else
+       } else {
       DB((dbg, LEVEL_2, "--> Translate %+F in <%+F,%d> into %+F\n", node, block, pos, res));
+       }
+
     return res;
   }
   return node;
@@ -791,8 +795,9 @@ static void insert_nodes(ir_node *block, void *ctx)
   value_set_foreach(entry, idom_info->new_set) {
     updated |= value_add_or_replace(curr_info->avail_out, entry->node, entry->value);
   }
-  if (updated)
+  if (updated) {
     dump_value_set(curr_info->avail_out, "Updated [Avail_out]", block);
+  }
 
   if (arity <= 1)
     return;