use xmalloc instead of malloc
[libfirm] / ir / ir / iropt_dbg.h
index 3d0883a..7d0d5f7 100644 (file)
   } while(0)
 
 /**
- * Merge the debuig info due to a Phi optimization.
+ * Merge the debug info due to a Phi optimization.
  * A Phi node was replaced by one of its input (the only meaningful)
  *
  * @param phi  the Phi node that will be replaced
   } while(0)
 
 
+/**
+ * Merge the debug info due to a Sync optimization.
+ * A Sync node was replaced by one of its input (the only meaningful)
+ *
+ * @param sync  the Sync node that will be replaced
+ * @param n     in Sync Input that will replace Sync
+ */
+#define DBG_OPT_SYNC(sync, n)                                   \
+  do {                                                          \
+         hook_merge_nodes(&n, 1, &sync, 1, HOOK_OPT_SYNC);               \
+         __dbg_info_merge_sets(&n, 1, &sync, 1, dbg_opt_ssa);        \
+  } while(0)
+
+
 /**
  * Merge the debug info due to Write-after-Write optimization:
  * Store oldst will be removed, because Store st overwrites it.
  * Merge the debug info after a tuple optimization.
  * a Proj(Tuple) is replaced by the associated tuple value.
  *
- * @param oldn   the Proj node
+ * @param proj   the Proj node
  * @param tuple  the Tuple node
  * @param n      the Proj(Tuple) value
  */
  * A node was replaced by a constant due to a Confimation.
  *
  * @param oldn  the old node
- * @param c     the new constnt node
+ * @param c     the new constant node
  */
 #define DBG_OPT_CONFIRM_C(oldn, c)                              \
   do {                                                          \
     __dbg_info_merge_pair(c, oldn, dbg_opt_confirm);            \
   } while(0)
 
+/**
+ * A exception exdge was removed due to a Confirmation prove.
+ *
+ * @param oldn  the old node
+ */
+#define DBG_OPT_EXC_REM(oldn)                                   \
+  do {                                                          \
+    hook_merge_nodes(NULL, 0, &oldn, 1, HOOK_OPT_EXC_REM);      \
+  } while(0)
+
 /**
  * A node could be evaluated to a value due to a Confirm.
  * This will lead to a constant evaluation.