Make debug macros "more useful"
[libfirm] / ir / ir / irgraph.c
index f14c712..8464cdd 100644 (file)
@@ -1,9 +1,9 @@
 /* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
-** All rights reserved.
-**
-** Authors: Martin Trapp, Christian Schaefer
-**
-**
+* All rights reserved.
+*
+* Authors: Martin Trapp, Christian Schaefer
+*
+*
 */
 
 /* $Id$ */
@@ -58,7 +58,6 @@ void free_Phi_in_stack(Phi_in_stack *s);
 ir_graph *
 new_ir_graph (entity *ent, int n_loc)
 {
-  int i;
   ir_graph *res;
   ir_node *first_block;
   ir_node *projX;
@@ -67,8 +66,8 @@ new_ir_graph (entity *ent, int n_loc)
   current_ir_graph = res;
   add_irp_irg(res);          /* remember this graph global. */
 
-  /** Internal information for graph construction either held in the graph or
-  *** initialized for each graph. **/
+/**
+  * initialized for each graph. **/
 #if PRECISE_EXC_CONTEXT
   res->n_loc = n_loc + 1 + 1; /* number of local variables that are never
                                  dereferenced in this graph plus one for
@@ -105,7 +104,7 @@ new_ir_graph (entity *ent, int n_loc)
   res->ent = ent;
   set_entity_irg(ent, res);
 
-  /** A type that represents the stack frame.  A class type so that it can
+/**
       contain "inner" methods as in Pascal. **/
   res->frame_type = new_type_class(mangle(get_entity_ident(ent),
          id_from_str(FRAME_TP_SUFFIX, strlen(FRAME_TP_SUFFIX))));
@@ -160,6 +159,7 @@ ir_graph *new_const_code_irg() {
 #endif
   res->obst      = (struct obstack *) xmalloc (sizeof (struct obstack));
   obstack_init (res->obst);
+  res->phase_state = phase_building;
   res->pinned = pinned;
   res->value_table = new_identities (); /* value table for global value
                                           numbering for optimizing use in
@@ -474,7 +474,7 @@ inc_irg_visited (ir_graph *irg)
 unsigned long
 get_max_irg_visited(void)
 {
-  int i;
+  //int i;
   //for(i = 0; i < get_irp_n_irgs(); i++)
   //  assert(max_irg_visited >= get_irg_visited(get_irp_irg(i)));
   return max_irg_visited;
@@ -487,7 +487,7 @@ void set_max_irg_visited(int val) {
 unsigned long
 inc_max_irg_visited(void)
 {
-  int i;
+  //int i;
   //  for(i = 0; i < get_irp_n_irgs(); i++)
   //assert(max_irg_visited >= get_irg_visited(get_irp_irg(i)));
   max_irg_visited++;