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

- add support for cond_eval statistics

[r25194]
parent 1a4bb21b
......@@ -87,6 +87,7 @@ typedef enum {
dbg_opt_confirm, /**< A Firm subgraph was replace because of a Confirmation. */
dbg_gvn_pre, /**< A Firm node was replace because of the GVN-PRE algorithm. */
dbg_combo, /**< A Firm node was replace because of the combo algorithm. */
dbg_cond_eval, /**< A Firm node was replace because of the conditional evaluation algorithm. */
dbg_backend, /**< A Firm subgraph was replaced because of a Backend transformation */
dbg_max /**< Maximum value. */
} dbg_action;
......
......@@ -121,6 +121,7 @@ enum firmstat_optimizations_t {
FS_OPT_COMBO_CF, /**< Combo: removed conditional control flow */
FS_OPT_COMBO_FOLLOWER, /**< Combo: replaced a follower */
FS_OPT_COMBO_CONGRUENT, /**< Combo: replaced by congruent */
FS_OPT_COND_EVAL, /**< Conditional evaluation: removed conditional control flow */
FS_OPT_RTS_ABS, /**< RTS optimization: call to abs() replaced */
FS_OPT_RTS_ALLOCA, /**< RTS optimization: call to alloca() replaced */
FS_OPT_RTS_SQRT, /**< RTS optimization: call to sqrt() replaced */
......
......@@ -97,7 +97,7 @@
/**
* Merge the debug info due to an algebraic_simplification.
* A node could be avaluated into a Constant.
* A node could be evaluated into a Constant.
*
* @param oldn the node
* @param n the new constant holding the value
......@@ -416,4 +416,16 @@
__dbg_info_merge_pair(n, oldn, dbg_combo); \
} while(0)
/**
* Merge the debug info due to a cond eval result.
*
* @param oldn the old control flow node
* @param n the new control flow node replacing oldn
*/
#define DBG_OPT_COND_EVAL(oldn, n) \
do { \
hook_merge_nodes(&n, 1, &oldn, 1, FS_OPT_COND_EVAL); \
__dbg_info_merge_pair(n, oldn, dbg_cond_eval); \
} while(0)
#endif
......@@ -69,6 +69,7 @@ const char *dbg_action_2_str(dbg_action a) {
CASE(dbg_opt_confirm);
CASE(dbg_gvn_pre);
CASE(dbg_combo);
CASE(dbg_cond_eval);
CASE(dbg_backend);
default:
if (a <= dbg_max)
......
......@@ -138,6 +138,7 @@ static const struct {
{ FS_OPT_COMBO_CF, "Combo: removed conditional control flow" },
{ FS_OPT_COMBO_FOLLOWER, "Combo: removed a follower" },
{ FS_OPT_COMBO_CONGRUENT,"Combo: replaced by congruent" },
{ FS_OPT_COND_EVAL, "Conditional evaluation: removed conditional control flow" },
{ FS_OPT_RTS_ABS, "RTS optimization: call to abs() replaced" },
{ FS_OPT_RTS_ALLOCA, "RTS optimization: call to alloca() replaced" },
{ FS_OPT_RTS_SQRT, "RTS optimization: call to sqrt() replaced" },
......
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