Clean up turn_back_am(), panic on unknown arity.
[libfirm] / include / libfirm / iropt_dbg.h
index 3eb364c..a504c1d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -73,8 +73,8 @@
  * @param proj2  the second ProjX predecessor
  * @param n      the new Block
  */
-#define DBG_OPT_IFSIM1(oldn, proj1, proj2, n)                   \
-  do {                                                          \
+#define DBG_OPT_IFSIM1(oldn, proj1, proj2, n)                     \
+       do {                                                          \
          ir_node *ons[4];                                            \
          ons[0] = oldn;                                              \
          ons[1] = proj1;                                             \
@@ -89,8 +89,8 @@
  * @param oldn   the old Cond
  * @param n      the new Jmp
  */
-#define DBG_OPT_IFSIM2(oldn, n)                            \
-  do {                                                     \
+#define DBG_OPT_IFSIM2(oldn, n)                              \
+       do {                                                     \
          hook_merge_nodes(&n, 1, &oldn, 1, HOOK_OPT_IFSIM);     \
          __dbg_info_merge_pair(n, oldn, dbg_if_simplification); \
        } while(0)
  * @param n     the new constant holding the value
  */
 #define DBG_OPT_CSTEVAL(oldn, n)                                  \
-  do {                                                                 \
-         hook_merge_nodes(&n, 1, &oldn, 1, HOOK_OPT_CONST_EVAL);         \
-    __dbg_info_merge_pair(n, oldn, dbg_const_eval);                 \
-  } while(0)
+       do {                                                          \
+         hook_merge_nodes(&n, 1, &oldn, 1, HOOK_OPT_CONST_EVAL);     \
+         __dbg_info_merge_pair(n, oldn, dbg_const_eval);             \
+       } while(0)
 
 /**
  * Merge the debug info due to an algebraic_simplification.
  * @param n     the new node replacing oldn
  * @param flag  firm statistics option
  */
-#define DBG_OPT_ALGSIM0(oldn, n, flag)                            \
-  do {                                                            \
-    hook_merge_nodes(&n, 1, &oldn, 1, flag);                           \
-    __dbg_info_merge_pair(n, oldn, dbg_algebraic_simplification); \
-  } while(0)
+#define DBG_OPT_ALGSIM0(oldn, n, flag)                              \
+       do {                                                            \
+         hook_merge_nodes(&n, 1, &oldn, 1, flag);                      \
+         __dbg_info_merge_pair(n, oldn, dbg_algebraic_simplification); \
+       } while(0)
 
 /**
  * Merge the debug info due to an algebraic_simplification.
          ons[0] = oldn;                                              \
          ons[1] = pred;                                              \
          ons[2] = n;                                                 \
-         hook_merge_nodes(&n, 1, ons, SIZ(ons), HOOK_OPT_ALGSIM);    \
+         hook_merge_nodes(&n, 1, ons, SIZ(ons), flag);               \
          __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_algebraic_simplification); \
        } while(0)
 
 /**
  * Merge the debug info due to an algebraic_simplification.
  */
-#define DBG_OPT_ALGSIM3(oldn, a, n)                             \
+#define DBG_OPT_ALGSIM3(oldn, a, n, flag)                         \
        do {                                                          \
          ir_node *ons[2];                                            \
          ons[0] = oldn;                                              \
          ons[1] = a;                                                 \
-         hook_merge_nodes(&n, 1, ons, SIZ(ons), HOOK_OPT_ALGSIM);    \
+         hook_merge_nodes(&n, 1, ons, SIZ(ons), flag);               \
          __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_algebraic_simplification); \
        } while(0)
 
          hook_merge_nodes(NULL, 0, &n, 1, HOOK_OPT_CONFIRM_E);    \
        } while(0)
 
+/**
+ * Merge the debug info due to a GVN-PRE result.
+ *
+ * @param oldn  the old node
+ * @param n     the new node replacing oldn
+ * @param flag  firm statistics option
+ */
+#define DBG_OPT_GVN_PRE(oldn, n, flag)             \
+       do {                                           \
+         hook_merge_nodes(&n, 1, &oldn, 1, flag);     \
+         __dbg_info_merge_pair(n, oldn, dbg_gvn_pre); \
+       } while(0)
+
+/**
+ * Merge the debug info due to a combo result.
+ *
+ * @param oldn  the old node
+ * @param n     the new node replacing oldn
+ * @param flag  firm statistics option
+ */
+#define DBG_OPT_COMBO(oldn, n, flag)             \
+       do {                                         \
+         hook_merge_nodes(&n, 1, &oldn, 1, flag);   \
+         __dbg_info_merge_pair(n, oldn, dbg_combo); \
+       } while(0)
+
 #endif