Commit 69571e6a authored by Matthias Braun's avatar Matthias Braun
Browse files

also count remats

[r22335]
parent db82f30b
......@@ -102,13 +102,14 @@ typedef enum arch_irn_class_t {
arch_irn_class_normal = 1 << 0,
arch_irn_class_spill = 1 << 1,
arch_irn_class_reload = 1 << 2,
arch_irn_class_copy = 1 << 3,
arch_irn_class_perm = 1 << 4,
arch_irn_class_branch = 1 << 5,
arch_irn_class_call = 1 << 6,
arch_irn_class_load = 1 << 7,
arch_irn_class_store = 1 << 8,
arch_irn_class_stackparam = 1 << 9,
arch_irn_class_remat = 1 << 3,
arch_irn_class_copy = 1 << 4,
arch_irn_class_perm = 1 << 5,
arch_irn_class_branch = 1 << 6,
arch_irn_class_call = 1 << 7,
arch_irn_class_load = 1 << 8,
arch_irn_class_store = 1 << 9,
arch_irn_class_stackparam = 1 << 10,
} arch_irn_class_t;
/**
......
......@@ -232,6 +232,7 @@ typedef struct _node_stat_t {
unsigned int n_perms; /**< Perms */
unsigned int n_spills; /**< Spill nodes */
unsigned int n_reloads; /**< Reloads */
unsigned int n_remats; /**< Remats */
} node_stat_t;
struct node_stat_walker {
......@@ -258,6 +259,8 @@ static void node_stat_walker(ir_node *irn, void *data)
++env->stat->n_spills;
if(classify & arch_irn_class_reload)
++env->stat->n_reloads;
if(classify & arch_irn_class_remat)
++env->stat->n_remats;
if(classify & arch_irn_class_copy)
++env->stat->n_copies;
if(classify & arch_irn_class_perm)
......@@ -521,6 +524,8 @@ static void be_ra_chordal_main(be_irg_t *birg)
node_stat.n_mem_phis - last_node_stat.n_mem_phis);
stat_ev_dbl("bechordal_reloads",
node_stat.n_reloads - last_node_stat.n_reloads);
stat_ev_dbl("bechordal_remats",
node_stat.n_remats - last_node_stat.n_remats);
stat_ev_dbl("bechordal_spills",
node_stat.n_spills - last_node_stat.n_spills);
stat_ev_dbl("bechordal_perms_after_coal",
......
......@@ -325,6 +325,9 @@ static arch_irn_class_t ia32_classify(const ir_node *irn) {
if (is_ia32_is_spill(irn))
classification |= arch_irn_class_spill;
if (is_ia32_is_remat(irn))
classification |= arch_irn_class_remat;
return classification;
}
......
Markdown is supported
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