removed warnings
authorGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Thu, 30 Jan 2003 11:29:25 +0000 (11:29 +0000)
committerGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Thu, 30 Jan 2003 11:29:25 +0000 (11:29 +0000)
new dumper

[r675]

ir/ir/irdump.c
ir/ir/irdump.h
ir/ir/irgopt.c
ir/ir/irgraph.c
ir/ir/irnode.h
ir/ir/iropt.c

index 1b36611..b301db0 100644 (file)
@@ -174,11 +174,6 @@ dump_node_mode (ir_node *n)
   }
 }
 
-static void dump_node_loop_info(ir_node *n) {
-  //  if (get_irn_loop(n))
-  //  xfprintf(F, "\n in loop %d", get_loop_depth(get_irn_loop(n)));
-}
-
 static INLINE void
 dump_node_nodeattr (ir_node *n)
 {
@@ -757,7 +752,7 @@ static void print_type_info(type *tp) {
     xfprintf(F, "state: layout_fixed,\n");
   }
   if (get_type_mode(tp))
-    xfprintf(F, "mode: %s,\n", get_mode_name(get_type_mode(tp)));
+    xfprintf(F, "mode: %I,\n", get_mode_ident(get_type_mode(tp)));
   xfprintf(F, "size: %dB,\n", get_type_size(tp));
 }
 
@@ -812,34 +807,42 @@ void dump_entity_node(entity *ent) {
   xfprintf (F, DEFAULT_TYPE_ATTRIBUTE);
   xfprintf (F, "label: ");
   xfprintf (F, "\"ent %I\" " ENTITY_NODE_ATTR , get_entity_ident(ent));
+  fprintf (F, "\n info1:\"\nallocation:  ");
   switch (get_entity_allocation(ent)) {
-    case dynamic_allocated:   fprintf (F, " info1:\"dynamic allocated\n");   break;
-    case automatic_allocated: fprintf (F, " info1:\"automatic allocated\n"); break;
-    case static_allocated:    fprintf (F, " info1:\"static allocated\n");    break;
+    case dynamic_allocated:   fprintf (F, "dynamic allocated");   break;
+    case automatic_allocated: fprintf (F, "automatic allocated"); break;
+    case static_allocated:    fprintf (F, "static allocated");    break;
+    case parameter_allocated: fprintf (F, "parameter allocated"); break;
   }
+  fprintf (F, "\nvisibility:  ");
   switch (get_entity_visibility(ent)) {
-    case local:              fprintf (F, "local\n");             break;
-    case external_visible:   fprintf (F, "external_visible\n");  break;
-    case external_allocated: fprintf (F, "external_allocate\n"); break;
+    case local:              fprintf (F, "local");             break;
+    case external_visible:   fprintf (F, "external_visible");  break;
+    case external_allocated: fprintf (F, "external_allocate"); break;
   }
+  fprintf (F, "\nvariability: ");
   switch (get_entity_variability(ent)) {
-    case uninitialized: fprintf (F, "uninitialized\n");break;
-    case initialized:   fprintf (F, "initialized\n");  break;
-    case part_constant: fprintf (F, "part_constant\n");break;
-    case constant:      fprintf (F, "constant\n");     break;
+    case uninitialized: fprintf (F, "uninitialized");break;
+    case initialized:   fprintf (F, "initialized");  break;
+    case part_constant: fprintf (F, "part_constant");break;
+    case constant:      fprintf (F, "constant");     break;
   }
+  fprintf (F, "\nvolatility:  ");
   switch (get_entity_volatility(ent)) {
-    case non_volatile: fprintf (F, "non_volatile\n"); break;
-    case is_volatile:  fprintf (F, "is_volatile\n");  break;
+    case non_volatile: fprintf (F, "non_volatile"); break;
+    case is_volatile:  fprintf (F, "is_volatile");  break;
   }
+  fprintf (F, "\npeculiarity: ");
   switch (get_entity_peculiarity(ent)) {
-    case description: fprintf (F, "description\n"); break;
-    case inherited:   fprintf (F, "inherited\n");   break;
-    case existent:    fprintf (F, "existent\n");    break;
+    case description: fprintf (F, "description"); break;
+    case inherited:   fprintf (F, "inherited");   break;
+    case existent:    fprintf (F, "existent");    break;
   }
+  xfprintf(F, "\nname:    %I\nld_name: %I", get_entity_ident(ent), get_entity_ld_ident(ent));
+  fprintf(F, "\noffset:  %d", get_entity_offset(ent));
   if (is_method_type(get_entity_type(ent)))
-    xfprintf (F, "\n irg = %p ", get_entity_irg(ent));
-  xfprintf(F, "\"}\n");
+    xfprintf (F, "\nirg = %p ", get_entity_irg(ent));
+  xfprintf(F, "\"\n}\n");
 }
 
 /* dumps a type or entity and it's edges. */
@@ -973,6 +976,7 @@ dump_class_hierarchy_node (type_or_ent *tore, void *env) {
   switch (get_kind(tore)) {
   case k_entity: {
     entity *ent = (entity *)tore;
+    if (get_entity_owner(ent) == get_glob_type()) break;
     if ((env) && is_class_type(get_entity_owner(ent))) {
       /* The node */
       dump_entity_node(ent);
@@ -988,6 +992,7 @@ dump_class_hierarchy_node (type_or_ent *tore, void *env) {
   case k_type:
     {
       type *tp = (type *)tore;
+      if (tp == get_glob_type()) break;
       switch (get_type_tpop_code(tp)) {
         case tpo_class: {
          print_type_node(tp);
index c3e40b5..42b855c 100644 (file)
@@ -107,6 +107,7 @@ void dump_all_types (void);
 /**
  *
  *    - Dumps the class hierarchy with or without entities.
+ *   Does not dump the global type.
  *   Dumps a node for all classes and the sub/supertype relations.  If
  *   entities is set to true also dumps the entities of classes, but without
  *   any additional information as the entities type.  The overwrites relation
index bef7513..03e1eeb 100644 (file)
@@ -853,7 +853,6 @@ void inline_small_irgs(ir_graph *irg, int size) {
     /* There are calls to inline */
     collect_phiprojs(irg);
     for (i = 0; i < pos; i++) {
-      char buf[1024];
       tarval *tv;
       ir_graph *callee;
       tv = get_Const_tarval(get_Call_ptr(calls[i]));
@@ -1167,7 +1166,7 @@ static void merge_blocks(ir_node *n, void *env) {
       if (!get_optimize() || (!get_opt_control_flow_straightening()
                              && !get_opt_control_flow_weak_simplification()))
        /* how could something be optimized if flags are not set? */
-       assert(0 && "strange ??!!");
+       assert(0 && "strange ?? !!");
       exchange (b, new);
       b = new;
       new = equivalent_node(b);
index 47a9085..8464cdd 100644 (file)
@@ -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;
@@ -475,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;
@@ -488,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++;
index 75c59df..fd68eef 100644 (file)
@@ -558,6 +558,7 @@ ir_node *get_fragile_op_mem(ir_node *node);
 #define DDMNB(X)     xprintf("%I%I: %ld (in block %ld)\n", get_irn_opident(X), get_irn_modeident(X), get_irn_node_nr(X), get_irn_node_nr(get_nodes_Block(X)))
 #define DDMT(X)      xprintf("%s(l.%i) %I %I: %p\n", __FUNCTION__, __LINE__, get_type_tpop_nameid(X), get_type_ident(X), (X))
 #define DDME(X)      xprintf("%s(l.%i) %I: %p\n", __FUNCTION__, __LINE__, get_entity_ident(X), (X))
+#define DDMEO(X)     xprintf("%s(l.%i) %I (own: %I): %p\n", __FUNCTION__, __LINE__, get_entity_ident(X), get_type_ident(get_entity_owner(X)), (X))
 #define DDMG(X)      xprintf("%s(l.%i) %I: %p\n", __FUNCTION__, __LINE__, get_irg_ent(get_entity_ident(X)), (X))
 
 #else
@@ -577,6 +578,7 @@ ir_node *get_fragile_op_mem(ir_node *node);
 #define DDMT(X)      xprintf("%s(l.%i) %I %I: %p\n", __FILE__, __LINE__, get_type_tpop_nameid(X), get_type_ident(X), (X))
 #define DDME(X)      xprintf("%s(l.%i) %I: %p\n", __FILE__, __LINE__, get_entity_ident(X), (X))
 #define DDMG(X)      xprintf("%s(l.%i) %I: %p\n", __FILE__, __LINE__, get_irg_ent(get_entity_ident(X)), (X))
+#define DDMI(X)      xprintf("%s(l.%i) %I: %p\n", __FILE__, __LINE__, (X), (X))
 
 #endif /* __GNUC__ */
 
index 9f79b71..8ac6aad 100644 (file)
@@ -251,7 +251,7 @@ computed_value (ir_node *n)
 }  /* compute node */
 
 
-
+#if 0
 /* returns 1 if the a and b are pointers to different locations. */
 static bool
 different_identity (ir_node *a, ir_node *b)
@@ -268,7 +268,7 @@ different_identity (ir_node *a, ir_node *b)
   }
   return 0;
 }
-
+#endif
 
 /* equivalent_node returns a node equivalent to N.  It skips all nodes that
    perform no actual computation, as, e.g., the Id nodes.  It does not create