Dump alert, backspace and vertical tab in string initializers, too.
[libfirm] / ir / common / irtools.h
index afa6e7f..575dd39 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2011 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
 #define FIRM_COMMON_IRTOOLS_H
 
 #include "firm_types.h"
-
 #include "lc_opts.h"
-lc_opt_entry_t *firm_opt_get_root(void);
-
 #include "pset.h"
 
-#undef MIN
-#undef MAX
-#define MAX(x, y) ((x) > (y) ? (x) : (y))
-#define MIN(x, y) ((x) < (y) ? (x) : (y))
-
-/* calculate the address of the one past last element of an array whose size is
- * known statically */
-#define ENDOF(x) ((x) + sizeof(x) / sizeof(*(x)))
-
-/**
- * Three valued compare as demanded by e.g. qsort(3)
- * @param c A number.
- * @param d Another number.
- * @return 0 if c == d, -1 if c < d, 1 if c > d.
- */
-#define QSORT_CMP(c, d) (((c) > (d)) - ((c) < (d)))
-
-
-/**
- * convert an integer into pointer
- */
-#define INT_TO_PTR(v)   ((void *)((char *)0 + (v)))
-
 /**
- * convert a pointer into an integer
+ * Return root commandlineoptions for libfirm library
  */
-#define PTR_TO_INT(v)   ((int)((char *)(v) - (char *)0))
+lc_opt_entry_t *firm_opt_get_root(void);
 
 /**
  * Dump a pset containing Firm objects.
@@ -77,10 +51,23 @@ void firm_clear_link(ir_node *n, void *env);
  * The famous clear_link_and_block_lists() walker-function.
  * Sets all links fields of visited nodes to NULL.
  * Additionally, clear all Phi-lists of visited blocks.
- * Do not implement it by yourself, use this one
+ * Do not implement it by yourself, use this one.
  */
 void firm_clear_node_and_phi_links(ir_node *n, void *env);
 
+/**
+ * Walker function, sets all phi list heads fields of visited Blocks
+ * to NULL.
+ * Use in conjunction with firm_collect_block_phis().
+ */
+void firm_clear_block_phis(ir_node *node, void *env);
+
+/**
+ * Walker function, links all visited Phi nodes into its block links.
+ * Use in conjunction with firm_clear_block_phis().
+ */
+void firm_collect_block_phis(ir_node *node, void *env);
+
 /**
  * Creates an exact copy of a node with same inputs and attributes in the
  * same block.