From: Götz Lindenmaier Date: Thu, 30 Jan 2003 11:29:25 +0000 (+0000) Subject: removed warnings X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=f184596a87296f33393e7ccde0ca44c8534da91e;p=libfirm removed warnings new dumper [r675] --- diff --git a/ir/ir/irdump.c b/ir/ir/irdump.c index 1b3661199..b301db02c 100644 --- a/ir/ir/irdump.c +++ b/ir/ir/irdump.c @@ -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); diff --git a/ir/ir/irdump.h b/ir/ir/irdump.h index c3e40b557..42b855c8b 100644 --- a/ir/ir/irdump.h +++ b/ir/ir/irdump.h @@ -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 diff --git a/ir/ir/irgopt.c b/ir/ir/irgopt.c index bef751393..03e1eeb39 100644 --- a/ir/ir/irgopt.c +++ b/ir/ir/irgopt.c @@ -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); diff --git a/ir/ir/irgraph.c b/ir/ir/irgraph.c index 47a908580..8464cddef 100644 --- a/ir/ir/irgraph.c +++ b/ir/ir/irgraph.c @@ -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++; diff --git a/ir/ir/irnode.h b/ir/ir/irnode.h index 75c59dfc9..fd68eef4d 100644 --- a/ir/ir/irnode.h +++ b/ir/ir/irnode.h @@ -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__ */ diff --git a/ir/ir/iropt.c b/ir/ir/iropt.c index 9f79b71f3..8ac6aadd0 100644 --- a/ir/ir/iropt.c +++ b/ir/ir/iropt.c @@ -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