3 * File name: ir/ir/iropt_dbg.h
4 * Purpose: Debug makros used in iropt.
5 * Author: Goetz Lindenmaier
9 * Copyright: (c) 2001-2003 Universität Karlsruhe
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
14 /* This file contains makros that generate the calls to
15 update the debug information after a transformation. */
17 #define SIZ(x) sizeof(x)/sizeof((x)[0])
20 * Merge the debug info due to a straightening optimization
26 ons[1] = get_Block_cfgpred(oldn, 0); \
27 stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_STG); \
28 __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_straightening); \
32 * Merge the debug info due to an if simplification
34 #define DBG_OPT_IFSIM \
40 ons[3] = get_Proj_pred(a); \
41 stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_IFSIM); \
42 __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_if_simplification); \
46 * Merge the debug info due to an algebraic_simplification
48 #define DBG_OPT_ALGSIM0 \
50 stat_merge_nodes(&n, 1, &oldn, 1, STAT_OPT_CONST_EVAL); \
51 __dbg_info_merge_pair(n, oldn, dbg_const_eval); \
54 #define DBG_OPT_ALGSIM1 \
60 stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_ALGSIM); \
61 __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_algebraic_simplification); \
64 #define DBG_OPT_ALGSIM2 \
68 ons[1] = get_unop_op(n); \
70 stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_ALGSIM); \
71 __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_algebraic_simplification); \
74 #define DBG_OPT_ALGSIM3 \
79 stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_ALGSIM); \
80 __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_algebraic_simplification); \
88 stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_PHI); \
89 __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_opt_ssa); \
98 stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_WAW); \
99 __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_write_after_write);\
102 #define DBG_OPT_WAR \
107 stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_WAR); \
108 __dbg_info_merge_sets(&c, 1, ons, SIZ(ons), dbg_write_after_read); \
111 #define DBG_OPT_TUPLE \
117 stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_TUPLE); \
118 __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_opt_auxnode); \
126 stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_ID); \
127 __dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_opt_auxnode); \