use tv_t.h instead of tv.h
[libfirm] / ir / ir / irgraph.h
index eb9d059..0d4ed54 100644 (file)
 #include <stddef.h>
 
 #include "irop.h"
+#include "irextbb.h"
 
 # ifndef _IRGRAPH_H_
 # define _IRGRAPH_H_
-# include "tv.h"
 # include "entity.h"
 
 /* to resolve recursion between irnode.h and irgraph.h */
@@ -83,7 +83,7 @@ typedef struct ir_graph ir_graph;
  *               it's result.  This is a Proj node on the fourth output of
  *               the start node.  This output is tagged as pn_Start_T_args.
  *
- *      *proj_args        The proj nodes off the args node.
+ *      *proj_args        The proj nodes of the args node.
  *
  *      *bad             The Bad node is an auxiliary node. It is needed only once,
  *                       so there is this globally reachable node.
@@ -250,9 +250,9 @@ ir_node *get_irg_args (const ir_graph *irg);
 /** Sets the node that represents the argument pointer. */
 void     set_irg_args (ir_graph *irg, ir_node *node);
 
-/** Returns an array of the nodes off the argument pointer. */
+/** Returns an array of the nodes of the argument pointer. */
 ir_node **get_irg_proj_args (const ir_graph *irg);
-/** Sets the array of the nodes off the argument pointer. */
+/** Sets the array of the nodes of the argument pointer. */
 void     set_irg_proj_args (ir_graph *irg, ir_node **nodes);
 
 /** Returns the current block of a graph. */
@@ -304,7 +304,10 @@ typedef enum {
   phase_low
 } irg_phase_state;
 
+/** returns the phase_state of an IR graph. */
 irg_phase_state get_irg_phase_state (const ir_graph *irg);
+
+/** sets the phase state of an IR graph. */
 void set_irg_phase_low(ir_graph *irg);
 
 /** state: op_pin_state_pinned
@@ -317,19 +320,16 @@ void set_irg_phase_low(ir_graph *irg);
 op_pin_state get_irg_pinned (const ir_graph *irg);
 
 /** state: outs_state
-   Outs are the back edges or def-use edges.
-   Values:  outs_none, outs_consistent, outs_inconsistent
-   outs_none: outs are not computed, no memory is allocated.
-   outs_consistent:  outs are computed and correct,
-   outs_inconsistent: outs have been computed, memory is still allocated,
-   but the graph has been changed since. */
+ *  Outs are the back edges or def-use edges of ir nodes.
+ *  Values:  outs_none, outs_consistent, outs_inconsistent */
 typedef enum {
-  outs_none,
-  outs_consistent,
-  outs_inconsistent
+  outs_none,         /**< Outs are not computed, no memory is allocated. */
+  outs_consistent,   /**< Outs are computed and correct. */
+  outs_inconsistent  /**< Outs have been computed, memory is still allocated,
+                       but the graph has been changed since. */
 } irg_outs_state;
 irg_outs_state get_irg_outs_state(const ir_graph *irg);
-void set_irg_outs_inconsistent(ir_graph *irg);
+void           set_irg_outs_inconsistent(ir_graph *irg);
 
 /** state: dom_state
    Signals the state of the dominator infomation.
@@ -345,12 +345,17 @@ typedef enum {
   dom_consistent,       /**< dominator information is computed and correct */
   dom_inconsistent      /**<  dominator information is computed but the graph has been changed since */
 } irg_dom_state;
+
+/** returns the dom_state of an IR graph. */
 irg_dom_state get_irg_dom_state(const ir_graph *irg);
+
+/** sets the dom_state of an IR graph. */
 void set_irg_dom_inconsistent(ir_graph *irg);
 
 /** state: loopinfo_state
-   Loop information describes the loops within the control and
-   data flow of the procedure.  */
+ *  Loop information describes the loops within the control and
+ *  data flow of the procedure.
+ */
 typedef enum {
   loopinfo_none             = 0,       /**< No loop information is constructed. Default. */
   loopinfo_constructed      = 1,       /**< Some kind of loop information is constructed. */
@@ -362,7 +367,7 @@ typedef enum {
                       are used in a switch. */
 
   /** IntRAprocedural loop information constructed and valid. */
-  loopinfo_consistent         = loopinfo_constructed | loopinfo_valid,
+  loopinfo_consistent         = loopinfo_constructed | loopinfo_for_firmjni | loopinfo_valid,
   /** IntRAprocedural loop information constructed and invalid. */
   loopinfo_inconsistent       = loopinfo_constructed | loopinfo_for_firmjni,
 
@@ -382,9 +387,13 @@ typedef enum {
   loopinfo_cf_ip_inconsistent = loopinfo_constructed | loopinfo_cf | loopinfo_inter
 } irg_loopinfo_state;
 
+/** Return the current loop information state. */
 irg_loopinfo_state get_irg_loopinfo_state(const ir_graph *irg);
+
+/** Sets the current loop information state. */
 void set_irg_loopinfo_state(ir_graph *irg, irg_loopinfo_state s);
-/** Sets the loopinformation state to the appropriate inconsistent state.
+
+/** Sets the loop information state to the appropriate inconsistent state.
    If state is 'none' does not change. */
 void set_irg_loopinfo_inconsistent(ir_graph *irg);
 
@@ -400,7 +409,11 @@ typedef enum {
   irg_callee_info_consistent,
   irg_callee_info_inconsistent
 } irg_callee_info_state;
+
+/** returns the callee_info_state of an IR graph. */
 irg_callee_info_state get_irg_callee_info_state(const ir_graph *irg);
+
+/** sets the callee_info_state of an IR graph. */
 void                  set_irg_callee_info_state(ir_graph *irg, irg_callee_info_state s);
 
 /** property:
@@ -418,26 +431,36 @@ irg_inline_property get_irg_inline_property(const ir_graph *irg);
 /** Sets the inline property of a graph. */
 void set_irg_inline_property(ir_graph *irg, irg_inline_property s);
 
-/** A void * field to link arbritary information to the node. */
+/** A void * field to link arbitrary information to the node. */
 void  set_irg_link (ir_graph *irg, void *thing);
 void *get_irg_link (const ir_graph *irg);
 
-/* increments visited by one */
+/** Increments visited flag by one.
+ *  @see also: get_irn_visited() get_irg_block_visited(). */
 void          inc_irg_visited (ir_graph *irg);
 unsigned long get_irg_visited (const ir_graph *irg);
 void          set_irg_visited (ir_graph *irg, unsigned long i);
+/** An interprocedural flag valid for all irgs.
+ *  @see also: get_irn_visited() get_irg_block_visited(). */
 unsigned long get_max_irg_visited (void);
 void          set_max_irg_visited (int val);
 unsigned long inc_max_irg_visited (void);
 
-/* increments block_visited by one */
+/** Increments block_visited by one.
+ *  @see also: get_irn_visited() get_irg_block_visited(). */
 void          inc_irg_block_visited (ir_graph *irg);
 unsigned long get_irg_block_visited (const ir_graph *irg);
 void          set_irg_block_visited (ir_graph *irg, unsigned long i);
 
-/** put the proj's into the same block as its predecessors */
+/** move Proj nodes into the same block as its predecessors */
 void normalize_proj_nodes(ir_graph *irg);
 
+/** set a description for local value n */
+void set_irg_loc_description(ir_graph *irg, int n, void *description);
+
+/** get the description for local value n */
+void *get_irg_loc_description(ir_graph *irg, int n);
+
 /**
  * Access custom graph data.
  * The data must have been registered with