minir_dumping should do something usefull now
[libfirm] / include / libfirm / vrp.h
index 68bdf69..1ffb44e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2009 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2010 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
 #define VRP_H
 
 enum range_types {
-       VRP_UNDEFINED, /* No information could be derived so far */
-       VRP_RANGE, /* bottom and top form a range, including both values */
-       VRP_ANTIRANGE, /* range from bottom to top can not be, but borders might
-                                         be */
-       VRP_VARYING /* information can not be derived */
+       VRP_UNDEFINED, /**< No information could be derived so far */
+       VRP_RANGE,     /**< bottom and top form a range, including both values */
+       VRP_ANTIRANGE, /**< range from bottom to top can not be, but borders might
+                         be */
+       VRP_VARYING    /**< information can not be derived */
 };
 
-enum range_ops {
-       VRP_NONE, /* range is defined absolute */
-       VRP_ADD, /* range + range_node are the possible values */
-       VRP_SUB /* range - range_node are the possible values */
-};
+/** VRP information */
+typedef struct {
+       int valid;                   /**< This node has valid vrp information */
+       tarval *bits_set;            /**< The bits which, by analysis, are  definitely set.
+                                         0: may be not set, 1: definitely set*/
+       tarval *bits_not_set;        /**< The bits which by analysis are definitely
+                                         not set, 1 for may be set, 0: definitely not set  */
+       enum range_types range_type; /**< The range represented by range_top, range_bottom */
+       tarval *range_bottom, *range_top;
+} vrp_attr;
 
 /**
  * Set vrp data on the graph irg
@@ -64,6 +69,15 @@ ir_graph_pass_t *set_vrp_pass(const char *name);
  *
  * @return the pn_Cmp, if one can be derived
  */
-pn_Cmp vrp_cmp(ir_node *left, ir_node *right);
+pn_Cmp vrp_cmp(const ir_node *left, const ir_node *right);
+
+/*
+ * Return the vrp data for this node
+ *
+ * @param n: the node for which to return the vrp information
+ *
+ * @return a pointer to the vrp data or NULL if there is none
+ */
+vrp_attr *vrp_get_info(const ir_node *n);
 
 #endif