Commit c4a2d173 authored by Michael Beck's avatar Michael Beck
Browse files

Added polymorphic calls, renamed ALGSIM0 into CSTEVAL

[r4312]
parent debeec92
......@@ -59,11 +59,11 @@
/**
* Merge the debug info due to an algebraic_simplification
*/
#define DBG_OPT_ALGSIM0(oldn, n) \
#define DBG_OPT_CSTEVAL(oldn, n) \
do { \
stat_merge_nodes(&n, 1, &oldn, 1, STAT_OPT_CONST_EVAL); \
__dbg_info_merge_pair(n, oldn, dbg_const_eval); \
} while(0)
__dbg_info_merge_pair(n, oldn, dbg_const_eval); \
} while(0)
#define DBG_OPT_ALGSIM1(oldn, a, b, n) \
do { \
......@@ -73,7 +73,7 @@
ons[2] = b; \
stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_ALGSIM); \
__dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_algebraic_simplification); \
} while(0)
} while(0)
#define DBG_OPT_ALGSIM2(oldn, pred, n) \
do { \
......@@ -83,7 +83,7 @@
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); \
} while(0)
} while(0)
#define DBG_OPT_ALGSIM3(oldn, a, n) \
do { \
......@@ -92,7 +92,7 @@
ons[1] = a; \
stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_ALGSIM); \
__dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_algebraic_simplification); \
} while(0)
} while(0)
#define DBG_OPT_PHI(oldn, first_val, n) \
do { \
......@@ -101,27 +101,39 @@
ons[1] = first_val; \
stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_PHI); \
__dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_opt_ssa); \
} while(0)
} while(0)
#define DBG_OPT_WAW(st1, st2) \
/**
* Merge the debug info due to Write-after-Write optimization:
* Store oldst will be replace by a reference to Store st
*/
#define DBG_OPT_WAW(oldst, st) \
do { \
ir_node *ons[2]; \
ons[0] = st1; \
ons[1] = st2; \
stat_merge_nodes(&st2, 1, ons, SIZ(ons), STAT_OPT_WAW); \
__dbg_info_merge_sets(&st2, 1, ons, SIZ(ons), dbg_write_after_write); \
} while(0)
ons[0] = oldst; \
ons[1] = st; \
stat_merge_nodes(&st, 1, ons, SIZ(ons), STAT_OPT_WAW); \
__dbg_info_merge_sets(&st, 1, ons, SIZ(ons), dbg_write_after_write); \
} while(0)
#define DBG_OPT_WAR(load, store) \
/**
* Merge the debug info due to Write-after-Read optimization:
* store will be replace by a reference to load
*/
#define DBG_OPT_WAR(store, load) \
do { \
ir_node *ons[2]; \
ons[0] = load; \
ons[1] = store; \
ons[0] = store; \
ons[1] = load; \
stat_merge_nodes(&load, 1, ons, SIZ(ons), STAT_OPT_WAR); \
__dbg_info_merge_sets(&load, 1, ons, SIZ(ons), dbg_write_after_read); \
} while(0)
} while(0)
/**
* Merge the debug info due to Read-after-Write optimization:
* load will be replace by a reference to store
*/
#define DBG_OPT_RAW(store, load) \
do { \
ir_node *ons[2]; \
......@@ -129,15 +141,32 @@
ons[1] = load; \
stat_merge_nodes(&store, 1, ons, SIZ(ons), STAT_OPT_RAW); \
__dbg_info_merge_sets(&store, 1, ons, SIZ(ons), dbg_read_after_write); \
} while(0)
} while(0)
/**
* Merge the debug info due to Read-after-Read optimization:
* Load oldld will be replace by a reference to Load ld
*/
#define DBG_OPT_RAR(oldld, ld) \
do { \
ir_node *ons[2]; \
ons[0] = oldld; \
ons[1] = ld; \
stat_merge_nodes(&ld, 1, ons, SIZ(ons), STAT_OPT_RAR); \
__dbg_info_merge_sets(&ld, 1, ons, SIZ(ons), dbg_read_after_read); \
} while(0)
#define DBG_OPT_RAR(ld1, ld2) \
/**
* Merge the debug info due to Read-a-Const optimization:
* Load ld will be replace by a Constant
*/
#define DBG_OPT_RC(ld, c) \
do { \
ir_node *ons[2]; \
ons[0] = ld1; \
ons[1] = ld2; \
stat_merge_nodes(&ld1, 1, ons, SIZ(ons), STAT_OPT_RAR); \
__dbg_info_merge_sets(&ld1, 1, ons, SIZ(ons), dbg_read_after_read); \
ons[0] = ld; \
ons[1] = c; \
stat_merge_nodes(&c, 1, ons, SIZ(ons), STAT_OPT_RC); \
__dbg_info_merge_sets(&ld, 1, ons, SIZ(ons), dbg_read_a_const); \
} while(0)
#define DBG_OPT_TUPLE(oldn, a, n) \
......@@ -148,7 +177,7 @@
ons[2] = n; \
stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_TUPLE); \
__dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_opt_auxnode); \
} while(0)
} while(0)
#define DBG_OPT_ID(oldn, n) \
do { \
......@@ -157,8 +186,11 @@
ons[1] = n; \
stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_ID); \
__dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_opt_auxnode); \
} while(0)
} while(0)
/**
* Merge the debug info due to ommon-subexpression elimination
*/
#define DBG_OPT_CSE(oldn, n) \
do { \
ir_node *ons[2]; \
......@@ -166,4 +198,20 @@
ons[1] = n; \
stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_CSE); \
__dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_opt_cse); \
} while(0)
} while(0)
#define DBG_OPT_POLY_ALLOC(oldn, n) \
do { \
ir_node *ons[3]; \
ons[0] = oldn; \
ons[1] = skip_Proj(get_Sel_ptr(oldn)); \
ons[2] = n; \
stat_merge_nodes(&n, 1, ons, SIZ(ons), STAT_OPT_POLY_CALL); \
__dbg_info_merge_sets(&n, 1, ons, SIZ(ons), dbg_rem_poly_call); \
} while(0)
#define DBG_OPT_POLY(oldn, n) \
do { \
stat_merge_nodes(&n, 1, &oldn, 1, STAT_OPT_POLY_CALL); \
__dbg_info_merge_pair(n, oldn, dbg_rem_poly_call); \
} while(0)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment