Add Sub(Sub(x, y), b) -> Sub(x, Add(y,b)) Transformation
[libfirm] / ir / stat / stat_dmp.c
index 809fba0..36bf98b 100644 (file)
@@ -57,6 +57,7 @@ static const struct {
        { FS_OPT_ADD_MUL_A_X_A,  "algebraic simplification: a * x + a = a * (x + 1)" },
        { FS_OPT_SUB_0_A,        "algebraic simplification: 0 - a = -a" },
        { FS_OPT_SUB_MUL_A_X_A,  "algebraic simplification: a * x - a = a * (x - 1)" },
+       { FS_OPT_SUB_SUB_X_Y_Z,  "algebraic simplification: (x - y) - z = x - (y + z)" },
        { FS_OPT_MUL_MINUS_1,    "algebraic simplification: a * -1 = -a" },
        { FS_OPT_OR,             "algebraic simplification: a | a = a | 0 = 0 | a = a" },
        { FS_OPT_AND,            "algebraic simplification: a & 0b1...1 = 0b1...1 & a =  a & a = a" },
@@ -455,7 +456,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 +549,8 @@ const dumper_t simple_dumper = {
        NULL,
        NULL,
        NULL,
+       NULL,
+       FOURCC('S', 'M', 'P', 'L'),
 };
 
 /* ---------------------------------------------------------------------- */
@@ -668,4 +671,6 @@ const dumper_t csv_dumper = {
        NULL,
        NULL,
        NULL,
+       NULL,
+       FOURCC('C', 'S', 'V', '\0')
 };