debug ir_fprintf commented out
[libfirm] / ir / stat / stat_dmp.c
index 9b901ba..9f70d5b 100644 (file)
@@ -269,7 +269,7 @@ static void simple_dump_be_block_permstat_class(dumper_t *dmp, perm_class_entry_
        fprintf(dmp->f, "chain distribution:\n");
 
        /* add all missing entries to chain distribution table */
-       for (i = 0; i < entry->n_regs; i++) {
+       for (i = 1; i <= entry->n_regs; i++) {
                snprintf(buf, sizeof(buf), "length %d", i);
                fprintf(dmp->f, "%12s", buf);
                stat_insert_int_distrib_tbl(sum_chains, i);
@@ -282,7 +282,7 @@ static void simple_dump_be_block_permstat_class(dumper_t *dmp, perm_class_entry_
        fprintf(dmp->f, "cycle distribution:\n");
 
        /* add all missing entries to cycle distribution table */
-       for (i = 0; i < entry->n_regs; i++) {
+       for (i = 1; i <= entry->n_regs; i++) {
                snprintf(buf, sizeof(buf), "length %d", i);
                fprintf(dmp->f, "%12s", buf);
                stat_insert_int_distrib_tbl(sum_cycles, i);
@@ -455,7 +455,7 @@ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry)
                /* dump block permutation statistics */
                simple_dump_be_block_permstat(dmp, entry);
 
-               if (dmp->status->stat_options & FIRMSTAT_COUNT_EXTBB) {
+               if (dmp->status->stat_options & FIRMSTAT_COUNT_EXTBB && entry->extbb_hash) {
                        /* dump extended block info */
                        fprintf(dmp->f, "\n%12s %12s %12s %12s %12s %12s %12s\n", "Extbb Nr", "Nodes", "intern E", "incoming E", "outgoing E", "Phi", "quot");
                        foreach_pset(entry->extbb_hash, eb_entry) {
@@ -548,6 +548,8 @@ const dumper_t simple_dumper = {
        NULL,
        NULL,
        NULL,
+       NULL,
+       FOURCC('S', 'M', 'P', 'L'),
 };
 
 /* ---------------------------------------------------------------------- */
@@ -668,4 +670,6 @@ const dumper_t csv_dumper = {
        NULL,
        NULL,
        NULL,
+       NULL,
+       FOURCC('C', 'S', 'V', '\0')
 };