X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbecopystat.c;h=f2023926687331d9b38fb25430e821d4f5bfd8e3;hb=2822b67ee0e55acbdc420a9dc9a29d7e2b3f4723;hp=11231704ca4ad94a78948cdcfcb779f260a2454c;hpb=e03dd955762d16d38fdec0e2d7c24bf36d0ecc2e;p=libfirm diff --git a/ir/be/becopystat.c b/ir/be/becopystat.c index 11231704c..f20239266 100644 --- a/ir/be/becopystat.c +++ b/ir/be/becopystat.c @@ -13,6 +13,7 @@ #include "irprog.h" #include "iredges.h" #include "phiclass_t.h" +#include "beutil.h" #include "becopyopt.h" #include "becopystat.h" #include "xmalloc.h" @@ -22,9 +23,9 @@ #define DEBUG_LVL SET_LEVEL_1 static firm_dbg_module_t *dbg = NULL; -#define MAX_ARITY 10 -#define MAX_CLS_SIZE 10 -#define MAX_CLS_PHIS 10 +#define MAX_ARITY 20 +#define MAX_CLS_SIZE 20 +#define MAX_CLS_PHIS 20 /** * For an explanation of these values see the code of copystat_dump_pretty @@ -72,7 +73,8 @@ enum vals_t { I_COPIES_MAX, /* max possible costs of copies*/ I_COPIES_INIT, /* number of copies in initial allocation */ I_COPIES_HEUR, /* number of copies after heuristic */ - I_COPIES_NSEC, /* number of copies after ilp with max n sec */ + I_COPIES_5SEC, /* number of copies after ilp with max n sec */ + I_COPIES_30SEC, /* number of copies after ilp with max n sec */ I_COPIES_OPT, /* number of copies after ilp */ I_COPIES_IF, /* number of copies inevitable due to root-arg-interf */ @@ -120,7 +122,7 @@ static void irg_stat_walker(ir_node *node, void *env) { if (is_Block(node)) /* count all blocks */ curr_vals[I_BLOCKS]++; - if (is_Phi(node) && mode_is_datab(get_irn_mode(node))) /* collect phis */ + if (is_Reg_Phi(node)) /* collect phis */ pset_insert_ptr(all_phi_nodes, node); if (is_Copy(arch_env, node)) @@ -272,17 +274,17 @@ static void stat_phi_class(be_chordal_env_t *chordal_env, pset *pc) { } #define is_curr_reg_class(irn) \ - (arch_get_irn_reg_class(chordal_env->session_env->main_env->arch_env, irn, \ - arch_pos_make_out(0)) == chordal_env->cls) + (arch_get_irn_reg_class(chordal_env->main_env->arch_env, irn, \ + -1) == chordal_env->cls) void copystat_collect_cls(be_chordal_env_t *chordal_env) { ir_node *n; pset *pc; - ir_graph *irg = chordal_env->session_env->irg; + ir_graph *irg = chordal_env->irg; if (last_irg != irg) { copystat_reset(); - copystat_collect_irg(irg, chordal_env->session_env->main_env->arch_env); + copystat_collect_irg(irg, chordal_env->main_env->arch_env); } for (n = pset_first(all_phi_nodes); n; n = pset_next(all_phi_nodes)) @@ -313,8 +315,11 @@ void copystat_add_init_costs(int costs) { void copystat_add_heur_costs(int costs) { curr_vals[I_COPIES_HEUR] += costs; } -void copystat_add_ilp_n_sec_costs(int costs) { - curr_vals[I_COPIES_NSEC] += costs; +void copystat_add_ilp_5_sec_costs(int costs) { + curr_vals[I_COPIES_5SEC] += costs; +} +void copystat_add_ilp_30_sec_costs(int costs) { + curr_vals[I_COPIES_30SEC] += costs; } void copystat_add_opt_costs(int costs) { curr_vals[I_COPIES_OPT] += costs;