Added call to eliminate_phi_interferences. Enabled phi-destruction.
[libfirm] / ir / be / becopyoptmain.c
index 73b6ebf..a648064 100644 (file)
 static firm_dbg_module_t *dbg = NULL;
 
 void be_copy_opt_init(void) {
-       dbg = firm_dbg_register("ir.be.copyopt");
+       dbg = firm_dbg_register("ir.be.copyoptmain");
        firm_dbg_set_mask(dbg, LEVEL_1);
 }
 
 void be_copy_opt(be_chordal_env_t *chordal_env) {
        copy_opt_t *co;
-       int lb, copies;
+       int lb, copy_costs;
 
-       co = new_copy_opt(chordal_env);
+       co = new_copy_opt(chordal_env, get_costs_loop_depth);
        DBG((dbg, LEVEL_1, "===>  %s  <===\n", co->name));
-       co_check_allocation(co);
 
 #ifdef DO_STAT
-       copies = co_get_copy_count(co);
-       curr_vals[I_COPIES_INIT] += copies;
-       DBG((dbg, LEVEL_1, "Init copies: %3d\n", copies));
+       copy_costs = co_get_copy_costs(co);
+       curr_vals[I_COPIES_INIT] += copy_costs;
+       DBG((dbg, LEVEL_1, "Init costs: %3d\n", copy_costs));
 #endif
 
 #ifdef DO_HEUR
        co_heur_opt(co);
-       co_check_allocation(co);
+       be_ra_chordal_check(chordal_env);
 #ifdef DO_STAT
-       copies = co_get_copy_count(co);
-       curr_vals[I_COPIES_HEUR] += copies;
-       DBG((dbg, LEVEL_1, "Heur copies: %3d\n", copies));
+       copy_costs = co_get_copy_costs(co);
+       curr_vals[I_COPIES_HEUR] += copy_costs;
+       DBG((dbg, LEVEL_1, "Heur costs: %3d\n", copy_costs));
 #endif
 #endif
 
 #ifdef DO_ILP
        lb = co_get_lower_bound(co);
-       copies = co_get_copy_count(co);
-       assert(copies>=lb && "At least one computation of these two is boooogy");
+       copy_costs = co_get_copy_costs(co);
+       assert(copy_costs>=lb && "At least one computation of these two is boooogy");
 
-       if (copies > lb) {
+       if (copy_costs > lb) {
                co_ilp_opt(co);
-               co_check_allocation(co);
+               be_ra_chordal_check(chordal_env);
        }
 
 #ifdef DO_STAT
-       copies = co_get_copy_count(co);
-       curr_vals[I_COPIES_OPT] += copies;
-       DBG((dbg, LEVEL_1, "Opt  copies: %3d\n", copies));
-       assert(copies>=lb && "At least one computation of these two is boooogy");
+       copy_costs = co_get_copy_costs(co);
+       curr_vals[I_COPIES_OPT] += copy_costs;
+       DBG((dbg, LEVEL_1, "Opt  costs: %3d\n", copy_costs));
+       assert(copy_costs>=lb && "At least one computation of these two is boooogy");
 #endif
 #endif