X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firdumptxt.c;h=1167cb7368758cdc24c126b220c84130e27f6521;hb=8399216d8aebc713bbda04b6e3e250a1d52b20bf;hp=8a79d2471ce4a45de97a9e5b5772a850ee6bbed3;hpb=0a74ffff982804e5b1bf7c87ba1f172dfa94b655;p=libfirm diff --git a/ir/ir/irdumptxt.c b/ir/ir/irdumptxt.c index 8a79d2471..1167cb736 100644 --- a/ir/ir/irdumptxt.c +++ b/ir/ir/irdumptxt.c @@ -125,7 +125,7 @@ int dump_irnode_to_file(FILE *F, ir_node *n) { if ((get_irp_ip_view_state() != ip_view_no) && (get_irn_opcode(n) == iro_Filter || get_irn_opcode(n) == iro_Block)) { - fprintf(F, " inter arity: %d", get_irn_inter_arity(n)); + fprintf(F, " inter arity: %d\n", get_irn_inter_arity(n)); fprintf(F, " inter pred nodes: \n"); for ( i = 0; i < get_irn_inter_arity(n); ++i) { fprintf(F, " %d: %s ", i, is_intra_backedge(n, i) ? "be" : " "); @@ -150,20 +150,20 @@ int dump_irnode_to_file(FILE *F, ir_node *n) { fprintf(F, "\n"); } - /* Loop node Someone else please tell me what's wrong ... + /* Loop node. Someone else please tell me what's wrong ... */ if (get_irn_loop(n)) { ir_loop *loop = get_irn_loop(n); assert(loop); - fprintf(F, " in loop %d with depth %d\n", + fprintf(F, " in loop %d with depth %d\n", get_loop_loop_nr(loop), get_loop_depth(loop)); } - */ + /* Source types */ switch (get_irn_opcode(n)) { case iro_Block: { - fprintf(F, " block visited: %ld", get_Block_block_visited(n)); - fprintf(F, " dominator info: not implemented\n"); + fprintf(F, " block visited: %ld\n", get_Block_block_visited(n)); + fprintf(F, " dominator info: output not implemented\n"); /* not dumped: graph_arr */ /* not dumped: mature */ } break; @@ -245,7 +245,7 @@ int dump_irnode_to_file(FILE *F, ir_node *n) { } break; case iro_Const: { type *tp = get_Const_type(n); - assert(tp != none_type); + assert(tp != firm_none_type); fprintf(F, " Const of type %s \n", get_type_name_ex(get_Const_type(n), &bad)); } break; case iro_SymConst: { @@ -288,7 +288,7 @@ int dump_irnode_to_file(FILE *F, ir_node *n) { if (get_irg_typeinfo_state(get_irn_irg(n)) == irg_typeinfo_consistent || get_irg_typeinfo_state(get_irn_irg(n)) == irg_typeinfo_inconsistent ) - if (get_irn_typeinfo_type(n) != none_type) + if (get_irn_typeinfo_type(n) != firm_none_type) fprintf (F, " Analysed type: %s\n", get_type_name_ex(get_irn_typeinfo_type(n), &bad)); return bad; @@ -526,8 +526,7 @@ void dump_entity_to_file_prefix (FILE *F, entity *ent, char *prefix, unsigned max_depth = (depth > max_depth) ? depth : max_depth ; } - L_freq = xmalloc(sizeof(*L_freq) * 4 * max_depth); - memset(L_freq, 0, sizeof(*L_freq) * 4 * max_depth); + L_freq = xcalloc(4 * max_depth, sizeof(L_freq[0])); S_freq = L_freq + 1*max_depth; LA_freq = L_freq + 2*max_depth; @@ -643,8 +642,7 @@ void dump_entitycsv_to_file_prefix (FILE *F, entity *ent, char *prefix, unsig max_depth = (depth > max_depth) ? depth : max_depth ; } - L_freq = xmalloc(sizeof(*L_freq) * 4 * max_depth); - memset(L_freq, 0, sizeof(*L_freq) * 4 * max_depth); + L_freq = xcalloc(4 * max_depth, sizeof(L_freq[0])); S_freq = L_freq + 1*max_depth; LA_freq = L_freq + 2*max_depth; @@ -721,8 +719,7 @@ void dump_typecsv_to_file(FILE *F, type *tp, dump_verbosity verbosity, const cha max_depth = (depth > max_depth) ? depth : max_depth ; } - freq = xmalloc(sizeof(*freq) * 2 * max_depth); - memset(freq, 0, sizeof(*freq) * 2 * max_depth); + freq = xcalloc(2 * max_depth, sizeof(freq[0])); disp = freq + max_depth; @@ -848,8 +845,7 @@ void dump_type_to_file (FILE *F, type *tp, dump_verbosity verbosity) { max_depth = (depth > max_depth) ? depth : max_depth ; } - freq = xmalloc(sizeof(*freq) * max_depth); - memset(freq, 0, sizeof(*freq) * max_depth); + freq = xcalloc(max_depth, sizeof(freq[0])); for (i = 0; i < n_all; ++i) { ir_node *all = get_type_allocation(tp, i);