fixed warnings
[libfirm] / ir / opt / gvn_pre.c
index eca77db..d154485 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Project:     libFIRM
- * File name:   ir/opt/gvn_pre.c
- * Purpose:     Global Value Numbering Partial Redundancy Elimination
- *              (VanDrunen Hosking 2004)
- * Author:      Michael Beck, Rubino Geiss
- * Created:
- * CVS-ID:      $Id$
- * Copyright:   (c) 1998-2006 Universität Karlsruhe
+/**
+ * @file
+ * @brief   Global Value Numbering Partial Redundancy Elimination
+ *          (VanDrunen Hosking 2004)
+ * @author  Michael Beck, Rubino Geiss
+ * @version $Id$
+ * @summary
+ *
+ * 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);
 }
@@ -975,7 +977,7 @@ static void eliminate_nodes(elim_pair *pairs)
 
 /*
  * Argh: Endless loops cause problems, because the
- * insert algorithm did not terminate. We get tranalated nodes that
+ * insert algorithm did not terminate. We get translated nodes that
  * references the origin. These nodes are translated again and again...
  *
  * The current fix is to use post-dominance. This simple ignores
@@ -989,6 +991,8 @@ void do_gvn_pre(ir_graph *irg)
   block_info *p;
   unsigned antic_iter, insert_iter;
 
+  assert(!"COMPLETELY BROKEN YET, DO NOT USE");
+
   /* register a debug mask */
   FIRM_DBG_REGISTER(dbg, "firm.opt.gvn_pre");
   firm_dbg_set_mask(dbg, SET_LEVEL_2);