added doxygen comments
[libfirm] / ir / ir / irnode.h
index aa96f26..553e1ff 100644 (file)
 
 #include <stddef.h>
 
-/**
- * Projection numbers of compare: use for Proj nodes!
- * @remark there are numbers with normalized names below!
- */
-typedef enum {
-  False = 0,    /**< false */
-  Eq,           /**< equal */
-  Lt,           /**< less */
-  Le,           /**< less or equal */
-  Gt,           /**< greater */
-  Ge,           /**< greater or equal */
-  Lg,           /**< less or greater */
-  Leg = 7,      /**< less, equal or greater = ordered */
-  Uo,           /**< unordered */
-  Ue,           /**< unordered or equal */
-  Ul,           /**< unordered or less */
-  Ule,          /**< unordered, less or equal */
-  Ug,           /**< unordered or greater */
-  Uge,          /**< unordered, greater or equal */
-  Ne,           /**< unordered, less or greater = not equal */
-  True = 15     /**< true */
-  /* not_mask = Leg*/   /* bits to flip to negate comparison * @@ hack for jni interface */
-} pnc_number;   /* pnc: Projection Number Cmp */
-#define not_mask Leg
-
+# include "pnc.h"
 # include "tv.h"
 # include "irgraph.h"
 # include "entity.h"
@@ -48,7 +24,6 @@ typedef enum {
 # include "irmode.h"
 # include "type.h"
 # include "dbginfo.h"
-/* # include "exc.h" */
 
 /**
  * @file irnode.h
@@ -120,8 +95,8 @@ int           get_irn_inter_arity   (const ir_node *node);
    Assumes that current_ir_graph is set to the graph containing "node".
    "in" must contain all predecessors except the block that are required for
    the nodes opcode. */
-void          set_irn_in            (ir_node *node, int arity,
-                        ir_node *in[]);
+void          set_irn_in            (ir_node *node, int arity, ir_node *in[]);
+
 /* to iterate through the predecessors without touching the array. No
    order of predecessors guaranteed.
    To iterate over the operands iterate from 0 to i < get_irn_arity(),
@@ -378,9 +353,25 @@ typedef enum {
   pn_Raise_max   /**< number of projections from a Raise */
 } pn_Raise;  /* Projection numbers for Raise. */
 
+typedef enum {
+  CNST_NULL = TV_CLASSIFY_NULL,       /**< The node is a const(0). */
+  CNST_ONE = TV_CLASSIFY_ONE,         /**< The node is a const(1). */
+  CNST_ALL_ONE = TV_CLASSIFY_ALL_ONE, /**< The node is a const(11111...). */
+  CNST_OTHER = TV_CLASSIFY_OTHER,     /**< The tarvel of the const has another value. */
+  CNST_SYMCONST,                      /**< The node is symconst. */
+  CNST_NO_CONST                       /**< The node is no const at all. */
+} cnst_classify_t;
+
 tarval  *get_Const_tarval (ir_node *node);
 void     set_Const_tarval (ir_node *node, tarval *con);
 
+/**
+ * Classify a node concerning constant properties.
+ * @param irn A node to check for.
+ * @return Constant properties of that node.
+ */
+cnst_classify_t classify_Const(ir_node *irn);
+
 /** Returns the source language type of a Const node.
  * Must be an atomic type.  Mode of type must be mode of node.
  */
@@ -820,6 +811,9 @@ void     set_Free_size (ir_node *node, ir_node *size);
 type    *get_Free_type (ir_node *node);
 void     set_Free_type (ir_node *node, type *tp);
 
+where_alloc  get_Free_where (ir_node *node);
+void         set_Free_where (ir_node *node, where_alloc where);
+
 ir_node **get_Sync_preds_arr (ir_node *node);
 int       get_Sync_n_preds (ir_node *node);
 ir_node  *get_Sync_pred (ir_node *node, int pos);
@@ -893,7 +887,7 @@ int is_cfop(const ir_node *node);
 int is_ip_cfop(const ir_node *node);
 /** Returns true if the operation can change the control flow because
     of an exception: Call, Quot, DivMod, Div, Mod, Load, Store, Alloc,
-    Bad. */
+    Bad. Raise is not fragile, but a unconditional jump. */
 int is_fragile_op(const ir_node *node);
 /** Returns the memory operand of fragile operations. */
 ir_node *get_fragile_op_mem(ir_node *node);