New inlining schema implemented:
[libfirm] / ir / ir / irnode.h
index c615ad4..5e168d3 100644 (file)
@@ -94,16 +94,17 @@ typedef struct ir_node ir_node;
 /**
  *   Checks whether a pointer points to a ir node.
  *
- *   @param thing     an arbitrary pointer
- *
- *   @return
- *       true if the thing is a ir mode, else false
+ *   @param thing   an arbitrary pointer
+ *   @return        non-zero if the thing is a ir mode, else zero
  */
-int
-is_ir_node (const void *thing);
+int is_ir_node (const void *thing);
 
-/** returns the number of predecessors without the block predecessor: */
-int                  get_irn_arity         (const ir_node *node);
+/**
+ * Returns the number of predecessors without the block predecessor.
+ *
+ * @param node   the IR-node
+ */
+int           get_irn_arity         (const ir_node *node);
 int           get_irn_intra_arity   (const ir_node *node);
 int           get_irn_inter_arity   (const ir_node *node);
 
@@ -121,14 +122,20 @@ void          set_irn_in            (ir_node *node, int arity,
    to iterate including the Block predecessor iterate from i = -1 to
    i < get_irn_arity. */
 /* Access predecessor n */
-/* get_irn_n removes Id predecessors. */
+
+/**
+ * Get the n-th predecessor of a node.
+ * This function removes Id predecessors.
+ */
 ir_node      *get_irn_n             (ir_node *node, int n);
 ir_node      *get_irn_intra_n       (ir_node *node, int n);
 ir_node      *get_irn_inter_n       (ir_node *node, int n);
+
+/** Replace the n-th predecessor of a node with a new one. */
 void          set_irn_n             (ir_node *node, int n, ir_node *in);
-/** Sets the mode struct of node */
+/* Sets the mode struct of node.  */
 void          set_irn_mode (ir_node *node, ir_mode *mode);
-/** Gets the mode struct. */
+/** Gets the mode struct of a node.  */
 ir_mode      *get_irn_mode          (const ir_node *node);
 /** Gets the mode-enum modecode. */
 modecode      get_irn_modecode      (const ir_node *node);
@@ -136,7 +143,7 @@ modecode      get_irn_modecode      (const ir_node *node);
 ident        *get_irn_modeident     (const ir_node *node);
 /** Gets the string representation of the mode .*/
 const char   *get_irn_modename      (const ir_node *node);
-/** Gets the opcode struct of the node */
+/** Gets the opcode struct of the node. */
 ir_op        *get_irn_op            (const ir_node *node);
 /** Sets the opcode struct of the node. */
 void          set_irn_op            (ir_node *node, ir_op *op);
@@ -146,15 +153,24 @@ opcode        get_irn_opcode        (const ir_node *node);
 const char   *get_irn_opname        (const ir_node *node);
 /** Get the ident for a string representation of the opcode. */
 ident        *get_irn_opident       (const ir_node *node);
+/** Gets the visited counter of a node. */
 unsigned long get_irn_visited (const ir_node *node);
+/** Sets the visited counter of a node. */
 void          set_irn_visited (ir_node *node, unsigned long visited);
 /** Sets visited to get_irg_visited(current_ir_graph). */
 void          mark_irn_visited (ir_node *node);
-/** Returns 1 if visited < get_irg_visited(current_ir_graph).  */
+/** Returns 1 if visited < get_irg_visited(current_ir_graph). */
 int           irn_not_visited  (const ir_node *node);
-/** Returns 1 if visited >= get_irg_visited(current_ir_graph).  */
+/** Returns 1 if visited >= get_irg_visited(current_ir_graph). */
 int           irn_visited      (const ir_node *node);
+
+/**
+ * Sets the link of a node.
+ * Only allowed if the graph is NOT in phase_building.
+ */
 void          set_irn_link     (ir_node *node, void *link);
+
+/** Returns the link of a node.  */
 void         *get_irn_link     (const ir_node *node);
 
 /** Returns the ir_graph this node belongs to. Only valid if irg
@@ -197,13 +213,19 @@ new_ir_node (dbg_info *db,
  *
  */
 
-/* This works for all except Block.  To express the difference to
- * access routines that work for all nodes we use infix "nodes". */
+/** This works for all except Block.  To express the difference to
+ * access routines that work for all nodes we use infix "nodes" and do not
+ * name this function get_irn_block. */
 #define get_nodes_block get_nodes_Block
 ir_node  *get_nodes_Block (ir_node *node);
 #define set_nodes_block set_nodes_Block
 void      set_nodes_Block (ir_node *node, ir_node *block);
 
+/**
+ * @function get_irn_block
+ * @see get_nodes_block()
+ */
+
 /**
  * Projection numbers for result of Start node: use for Proj nodes!
  */
@@ -327,6 +349,7 @@ ir_node  *get_Cond_selector (ir_node *node);
 void      set_Cond_selector (ir_node *node, ir_node *selector);
 cond_kind get_Cond_kind (ir_node *node);
 void      set_Cond_kind (ir_node *node, cond_kind kind);
+long      get_Cond_defaultProj (ir_node *node);
 
 /**
  * Projection numbers for conditions.
@@ -856,7 +879,7 @@ ir_node *get_fragile_op_mem(ir_node *node);
 /** Output information about a node */
 #define DDMN(X)  printf("%s(l.%i) %s%s: %ld (%p)\n",         __MYFUNC__, __LINE__,  get_irn_opname(X), get_mode_name(get_irn_mode(X)), get_irn_node_nr(X), (void *)(X))
 /** Output information about a node and its block */
-#define DDMNB(X) printf("%s%s: %ld (in block %ld)\n", get_irn_opname(X),  get_mode_name(get_irn_mode(X)), get_irn_node_nr(X), get_irn_node_nr(get_nodes_Block(X)))
+#define DDMNB(X) printf("%s%s: %ld (in block %ld)\n", get_irn_opname(X),  get_mode_name(get_irn_mode(X)), get_irn_node_nr(X), get_irn_node_nr(get_nodes_block(X)))
 /** Output information about a type */
 #define DDMT(X)  printf("%s(l.%i) %s %s: %ld (%p)\n",        __MYFUNC__, __LINE__, get_type_tpop_name(X), get_type_name(X), get_type_nr(X), (void *)(X))
 /** Output information about an entity */