X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Firopt_dbg.h;h=a504c1dd3c3aec306e745bb582069b823e9220a7;hb=f7a0dee11313faad6f2ff54edc8eaadabd03e433;hp=5c3548d3997e1769517ade6e2fd3331a1b7aba69;hpb=1ce363f80e6a204d4011f85813362d9bd1d0e7e4;p=libfirm diff --git a/include/libfirm/iropt_dbg.h b/include/libfirm/iropt_dbg.h index 5c3548d39..a504c1dd3 100644 --- a/include/libfirm/iropt_dbg.h +++ b/include/libfirm/iropt_dbg.h @@ -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) @@ -103,10 +103,10 @@ * @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. @@ -115,11 +115,11 @@ * @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. @@ -154,19 +154,19 @@ 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) @@ -390,4 +390,30 @@ 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