added CJmp statistics
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Tue, 4 Apr 2006 14:24:23 +0000 (14:24 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Tue, 4 Apr 2006 14:24:23 +0000 (14:24 +0000)
ir/be/ia32/ia32_dbg_stat.h
ir/be/ia32/ia32_optimize.c

index 431c106..3d246e0 100644 (file)
  * @param oldn  the node
  * @param n     the new lea
  */
-#define DBG_OPT_LEA1(oldn, n)                                \
+#define DBG_OPT_LEA1(oldn, n)                               \
        do {                                                    \
                hook_merge_nodes(&n, 1, &oldn, 1, FS_BE_IA32_LEA);  \
                __dbg_info_merge_pair(n, oldn, dbg_backend);        \
        } while(0)
 
+/**
+ * Merge the debug info due to a LEA creation.
+ *
+ * @param oldn  the node
+ * @param n     the new lea
+ */
+#define DBG_OPT_LEA1(oldn, n)                               \
+       do {                                                    \
+               hook_merge_nodes(&n, 1, &oldn, 1, FS_BE_IA32_LEA);  \
+               __dbg_info_merge_pair(n, oldn, dbg_backend);        \
+       } while(0)
 
 /**
  * Merge the debug info due to a LEA creation.
                __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_backend);  \
        } while(0)
 
+/**
+ * A CJmp was created to save a cmp
+ *
+ * @param oldn  the old node
+ */
+#define DBG_OPT_CJMP(oldn)                                    \
+       do {                                                      \
+               hook_merge_nodes(NULL, 0, &oldn, 1, FS_BE_IA32_CJMP); \
+       } while(0)
+
+
 #endif /* _IA32_DBG_STAT_H_ */
index 1e3649d..33c361d 100644 (file)
@@ -395,6 +395,7 @@ static void ia32_optimize_CondJmp(ir_node *irn, ia32_code_gen_t *cg) {
 
        if (replace) {
                DBG((cg->mod, LEVEL_1, "replacing %+F by ", irn));
+               DBG_OPT_CJMP(irn);
 
                set_irn_op(irn, op_ia32_CJmp);