X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbestat.c;h=b65552a5d0396415678d7c0fc0368e61c5f727b4;hb=5474a1c188c9d59eea2c915515980cd9cbab58d8;hp=abe28ea8b2ca263024db5658db4b3a70d45965f3;hpb=f8cc15664f571aa7ef89d6f6bc8d5bd2b8ca7d53;p=libfirm diff --git a/ir/be/bestat.c b/ir/be/bestat.c index abe28ea8b..b65552a5d 100644 --- a/ir/be/bestat.c +++ b/ir/be/bestat.c @@ -105,7 +105,7 @@ void be_do_stat_reg_pressure(ir_graph *irg, const arch_register_class_t *cls) env.insn_count = 0; env.max_pressure = 0; env.regpressure = 0; - be_liveness_assure_sets(be_assure_liveness(irg)); + be_assure_live_sets(irg); env.lv = be_get_irg_liveness(irg); env.cls = cls; @@ -163,19 +163,10 @@ static void node_stat_walker(ir_node *irn, void *data) } else { (*stats)[BE_STAT_PHIS]++; } - } else if (!is_Proj(irn)) { - arch_irn_class_t classify = arch_irn_classify(irn); - - if (classify & arch_irn_class_spill) - (*stats)[BE_STAT_SPILLS]++; - if (classify & arch_irn_class_reload) - (*stats)[BE_STAT_RELOADS]++; - if (classify & arch_irn_class_remat) - (*stats)[BE_STAT_REMATS]++; - if (classify & arch_irn_class_copy) - (*stats)[BE_STAT_COPIES]++; - if (classify & arch_irn_class_perm) - (*stats)[BE_STAT_PERMS]++; + } else if (be_is_Perm(irn)) { + (*stats)[BE_STAT_PERMS]++; + } else if (be_is_Copy(irn)) { + (*stats)[BE_STAT_COPIES]++; } } @@ -205,9 +196,6 @@ static const char *get_stat_name(enum be_stat_tag_t tag) case BE_STAT_MEM_PHIS: return "mem_phis"; case BE_STAT_COPIES: return "copies"; case BE_STAT_PERMS: return "perms"; - case BE_STAT_SPILLS: return "spills"; - case BE_STAT_RELOADS: return "reloads"; - case BE_STAT_REMATS: return "remats"; default: panic("unknown stat tag found"); } } @@ -250,7 +238,7 @@ unsigned long be_count_insns(ir_graph *irg) static void block_count_walker(ir_node *node, void *data) { unsigned long *cnt = (unsigned long*)data; - if (node == get_irg_end_block(current_ir_graph)) + if (node == get_irg_end_block(get_irn_irg(node))) return; (*cnt)++; }