add missing DBG_OPT calls
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sun, 18 May 2008 23:44:40 +0000 (23:44 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sun, 18 May 2008 23:44:40 +0000 (23:44 +0000)
[r19656]

include/libfirm/firmstat.h
ir/ir/iropt.c
ir/stat/stat_dmp.c

index 3d72f6b..3f5b882 100644 (file)
@@ -68,6 +68,7 @@ enum firmstat_optimizations_t {
        FS_OPT_AND,                               /**< a & 0b1...1 = 0b1...1 & a =  a & a = a */
        FS_OPT_TO_EOR,                            /**< (a|b) & ~(a&b) = a^b */
        FS_OPT_EOR_A_A,                           /**< a ^ a = 0 */
+       FS_OPT_EOR_A_B_A,                         /**< (a ^ b) ^ a = b */
        FS_OPT_EOR_TO_NOT_BOOL,                   /**< bool ^ 1 = !bool */
        FS_OPT_EOR_TO_NOT,                        /**< x ^ 0b1..1 = ~x, (a ^ b) & b -> ~a & b */
        FS_OPT_NOT_CMP,                           /**< !(a cmp b) = a !cmp b */
index 70209ca..2878fd5 100644 (file)
@@ -887,9 +887,11 @@ static ir_node *equivalent_node_Eor(ir_node *n)
                if (aa == b) {
                        /* (a ^ b) ^ a -> b */
                        n = ab;
+                       DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_EOR_A_B_A);
                } else if (ab == b) {
                        /* (a ^ b) ^ b -> a */
                        n = aa;
+                       DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_EOR_A_B_A);
                }
        } else if (is_Eor(b)) {
                ir_node *ba = get_Eor_left(b);
@@ -898,9 +900,11 @@ static ir_node *equivalent_node_Eor(ir_node *n)
                if (ba == a) {
                        /* a ^ (a ^ b) -> b */
                        n = bb;
+                       DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_EOR_A_B_A);
                } else if (bb == a) {
                        /* a ^ (b ^ a) -> b */
                        n = ba;
+                       DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_EOR_A_B_A);
                }
        }
 
index e20b112..8dcb5d8 100644 (file)
@@ -86,6 +86,7 @@ static const struct {
        { FS_OPT_AND,            "algebraic simplification: a & 0b1...1 = 0b1...1 & a = a & a = (a|X) & a = a" },
        { FS_OPT_TO_EOR,         "algebraic simplification: (a|b) & ~(a&b) = a^b" },
        { FS_OPT_EOR_A_A,        "algebraic simplification: a ^ a = 0" },
+       { FS_OPT_EOR_A_B_A,      "algebraic simplification: (a ^ b) ^ a = b" },
        { FS_OPT_EOR_TO_NOT_BOOL,"boolean simplification: bool ^ 1 = !bool" },
        { FS_OPT_EOR_TO_NOT,     "algebraic simplification: x ^ 0b1..1 = ~x, (a ^ b) & b = ~a & b" },
        { FS_OPT_NOT_CMP,        "algebraic simplification: !(a cmp b) = a !cmp b" },