X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbecopyopt.c;h=7b7affc5ef0c2c30b5f997d7ff6ca94a2742a01e;hb=e0e9e9ace61d3ec46e4d09c7ab2c6947b17b2778;hp=ce7eed75aa95b12e392ea5168b1a87055e2cc173;hpb=75b78dc47d9f1310e0f07bc306b314e89bc5c50c;p=libfirm diff --git a/ir/be/becopyopt.c b/ir/be/becopyopt.c index ce7eed75a..7b7affc5e 100644 --- a/ir/be/becopyopt.c +++ b/ir/be/becopyopt.c @@ -48,7 +48,7 @@ #include "bemodule.h" #include "bearch.h" -#include "benode_t.h" +#include "benode.h" #include "beutil.h" #include "beifg_t.h" #include "beintlive_t.h" @@ -1126,13 +1126,17 @@ static FILE *my_open(const be_chordal_env_t *env, const char *prefix, const char void co_driver(be_chordal_env_t *cenv) { - ir_timer_t *timer = ir_timer_register("firm.be.copyopt", "runtime"); + ir_timer_t *timer = ir_timer_new(); co_complete_stats_t before, after; copy_opt_t *co; int was_optimal = 0; assert(selected_copyopt); + /* skip copymin if algo is 'none' */ + if(selected_copyopt->copyopt == void_algo) + return; + be_liveness_assure_chk(be_get_birg_liveness(cenv->birg)); co = new_copy_opt(cenv, cost_func); @@ -1175,6 +1179,7 @@ void co_driver(be_chordal_env_t *cenv) be_stat_ev("co_time", ir_timer_elapsed_msec(timer)); be_stat_ev_ull("co_optimal", was_optimal); + ir_timer_free(timer); if (dump_flags & DUMP_AFTER) { FILE *f = my_open(cenv, "", "-after.dot");