Removed ANNOUNCE macro
[libfirm] / ir / ir / irgraph_t.h
index f86e4b5..ef1f544 100644 (file)
@@ -76,6 +76,13 @@ enum irg_anchors {
   anchor_max
 };
 
+/** A callgraph entry for callees. */
+typedef struct cg_callee_entry {
+       ir_graph  *irg;        /**< The called irg. */
+       ir_node  **call_list;  /**< The list of all calls to the irg. */
+       int        max_depth;  /**< Maximum depth of all Call nodes to irg. */
+} cg_callee_entry;
+
 /**
  * An ir_graph holds all information for a procedure.
  */
@@ -132,15 +139,15 @@ struct ir_graph {
   void *link;                        /**< A void* field to link any information to
                                           the node. */
 
-  ir_graph **callers;                /**< For callgraph analysis. */
+  ir_graph **callers;                /**< For callgraph analysis: list of caller graphs. */
   unsigned char *caller_isbe;        /**< For callgraph analysis: set if backedge. */
-  ir_graph **callees;                /**< For callgraph analysis. */
+  cg_callee_entry **callees;         /**< For callgraph analysis: list of callee calls */
   unsigned char *callee_isbe;        /**< For callgraph analysis: set if backedge. */
   int        callgraph_loop_depth;         /**< For callgraph analysis */
   int        callgraph_recursion_depth;    /**< For callgraph analysis */
   double     method_execution_frequency;   /**< For callgraph analysis */
 
-  ir_loop   *l;
+  ir_loop   *l;                            /**< For callgraph analysis. */
 
   /* -- Fields for Walking the graph -- */
   unsigned long visited;             /**< this flag is an identifier for
@@ -148,6 +155,13 @@ struct ir_graph {
                     every time someone walks through
                     the graph */
   unsigned long block_visited;       /**< same as visited, for a complete block */
+
+#ifndef NDEBUG
+  unsigned using_visited        : 1; /**< set to 1 if we are currently using the visited flag */
+  unsigned using_block_visited : 1;  /**< set to 1 if we are currently using the block_visited flag */
+  unsigned using_irn_link      : 1;  /**< set to 1 if we are currently using the irn_link fields */
+#endif
+
   unsigned estimated_node_count;     /**< estimated number of nodes in this graph,
                                           updated after every walk */
   irg_edges_info_t edge_info;        /**< edge info for automatic outs */