From: Christian Würdig Date: Tue, 4 Apr 2006 14:24:23 +0000 (+0000) Subject: added CJmp statistics X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=aacffd4e4932a994bc3db1018bedfcc44eb667a7;p=libfirm added CJmp statistics --- diff --git a/ir/be/ia32/ia32_dbg_stat.h b/ir/be/ia32/ia32_dbg_stat.h index 431c106a3..3d246e03d 100644 --- a/ir/be/ia32/ia32_dbg_stat.h +++ b/ir/be/ia32/ia32_dbg_stat.h @@ -18,12 +18,23 @@ * @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. @@ -131,4 +142,15 @@ __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_ */ diff --git a/ir/be/ia32/ia32_optimize.c b/ir/be/ia32/ia32_optimize.c index 1e3649def..33c361d92 100644 --- a/ir/be/ia32/ia32_optimize.c +++ b/ir/be/ia32/ia32_optimize.c @@ -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);