X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firdumptxt.c;h=b66d51ff8286fd9cd96b7f3779e7c2de5568205b;hb=cb91bddc9cacdab7c28e4336847bd3dc248aa549;hp=39be89f62c8a141991f535e531739a07f476efbf;hpb=992ae79a29430a9cebce74cbb3eaa8eacfac98fe;p=libfirm diff --git a/ir/ir/irdumptxt.c b/ir/ir/irdumptxt.c index 39be89f62..b66d51ff8 100644 --- a/ir/ir/irdumptxt.c +++ b/ir/ir/irdumptxt.c @@ -22,6 +22,8 @@ #include "irprog_t.h" #include "entity_t.h" +#include "field_temperature.h" + int dump_node_opcode(FILE *F, ir_node *n); /* from irdump.c */ @@ -34,7 +36,8 @@ void dump_entity_to_file_prefix (FILE *F, entity *ent, char *prefix, unsigned type *type = get_entity_type(ent); if (verbosity & dump_verbosity_onlynames) { - fprintf(F, "%sentity %s (%ld)\n", prefix, get_entity_name(ent), get_entity_nr(ent)); + fprintf(F, "%sentity %s.%s (%ld)\n", prefix, get_type_name(get_entity_owner(ent)), + get_entity_name(ent), get_entity_nr(ent)); return; } @@ -89,10 +92,19 @@ void dump_entity_to_file_prefix (FILE *F, entity *ent, char *prefix, unsigned X(variability_constant); } fprintf(F, "\n"); - } else { /* no entityattrs */ + } else { /* no entattrs */ fprintf(F, "%s(%3d) %*s: %s", prefix, get_entity_offset_bits(ent), -40, get_type_name(get_entity_type(ent)), get_entity_name(ent)); if (is_method_type(get_entity_type(ent))) fprintf(F, "(...)"); + + if (verbosity & dump_verbosity_accessStats) { + if (get_entity_allocation(ent) == allocation_static) { + fprintf(F, " (stat)"); + } else { + if (get_entity_peculiarity(ent) == peculiarity_description) fprintf(F, " (desc)"); + if (get_entity_peculiarity(ent) == peculiarity_inherited) fprintf(F, " (inh)"); + } + } fprintf(F, "\n"); } @@ -148,6 +160,27 @@ void dump_entity_to_file_prefix (FILE *F, entity *ent, char *prefix, unsigned } fprintf(F, "\n"); } + + if (verbosity & dump_verbosity_accessStats) { + int n_acc = get_entity_n_accesses(ent); + fprintf(F, "%s Access Stats", prefix); + char comma = ':'; + for (i = 0; i < n_acc; ++i) { + ir_node *acc = get_entity_access(ent, i); + if (get_irn_op(acc) == op_Load) { + fprintf(F, "%c L", comma); + } else if (get_irn_op(acc) == op_Store) { + fprintf(F, "%c S", comma); + } else { + assert(0); + } + fprintf(F, " %d", get_weighted_loop_depth(acc)); + comma = ','; + } + fprintf(F, "\n"); + } + + } #undef X @@ -228,6 +261,20 @@ void dump_type_to_file (FILE *F, type *tp, dump_verbosity verbosity) { fprintf(F, ": details not implemented\n"); } } + + if (verbosity & dump_verbosity_accessStats) { + int n_all = get_type_n_allocations(tp); + fprintf(F, " Access Stats"); + char comma = ':'; + for (i = 0; i < n_all; ++i) { + ir_node *all = get_type_allocation(tp, i); + fprintf(F, "%c A", comma); + fprintf(F, " %d", get_weighted_loop_depth(all)); + comma = ','; + } + fprintf(F, "\n"); + } + fprintf(F, "\n\n"); } @@ -287,6 +334,9 @@ void dump_types_as_text(unsigned verbosity, const char *suffix) { for (i = 0; i < n_types; ++i) { type *t = get_irp_type(i); + + if (is_jack_rts_class(t)) continue; + dump_type_to_file(F, t, verbosity); }