X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firopt_dbg.h;h=07828796cb28f431f439a15b0f46ad5cc75df7e5;hb=e5bab593a4048c0a320d7794fb2cb17697da8389;hp=07b40d7f5b98f909a1c91b69c08a460409352221;hpb=c3cdeb9cb7d1c85da1ecc4cdc01a853c325ed0bd;p=libfirm diff --git a/ir/ir/iropt_dbg.h b/ir/ir/iropt_dbg.h index 07b40d7f5..07828796c 100644 --- a/ir/ir/iropt_dbg.h +++ b/ir/ir/iropt_dbg.h @@ -16,6 +16,20 @@ #define SIZ(x) sizeof(x)/sizeof((x)[0]) + +/** + * Merge the debug info due to dead code elimination + */ +#define DBG_OPT_DEAD \ + do { \ + ir_node *ons[2]; \ + ons[0] = oldn; \ + ons[1] = get_Block_cfgpred(oldn, 0); \ + stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_STG); \ + __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_dead_code); \ + } while(0) + + /** * Merge the debug info due to a straightening optimization */ @@ -62,10 +76,10 @@ } while(0) #define DBG_OPT_ALGSIM2 \ - do { \ + do { \ ir_node *ons[3]; \ ons[0] = oldn; \ - ons[1] = get_unop_op(n); \ + ons[1] = get_unop_op(oldn); \ ons[2] = n; \ stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_ALGSIM); \ __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_algebraic_simplification); \ @@ -108,6 +122,15 @@ __dbg_info_merge_sets(&c, 1, ons, SIZ(ons), dbg_write_after_read); \ } while(0) +#define DBG_OPT_RAW \ + do { \ + ir_node *ons[2]; \ + ons[0] = oldn; \ + ons[1] = c; \ + stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_RAW); \ + __dbg_info_merge_sets(&c, 1, ons, SIZ(ons), dbg_read_after_write); \ + } while(0) + #define DBG_OPT_TUPLE \ do { \ ir_node *ons[3]; \