X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=heuristical_co_ld.c;h=40e2296912147f422be084e2ceca0a220b94f9d0;hb=36ce90e5b4ad35ded2253c2e3b9b2283db90742f;hp=81ada27e75ffeae75acae7ef23791293eb1330b1;hpb=2574baf55fbe5e09e07d66c891de63fd791b7647;p=libfirm diff --git a/heuristical_co_ld.c b/heuristical_co_ld.c index 81ada27e7..40e229691 100644 --- a/heuristical_co_ld.c +++ b/heuristical_co_ld.c @@ -264,30 +264,22 @@ static void apply_heuristic_reductions_co(pbqp *pbqp, plist_t *rpeo) { #if KAPS_TIMING /* create timers */ - ir_timer_t *t_edge = ir_timer_register("be_pbqp_edges", "pbqp reduce independent edges"); - ir_timer_t *t_r0 = ir_timer_register("be_pbqp_r0", "pbqp R0 reductions"); - ir_timer_t *t_r1 = ir_timer_register("be_pbqp_r1", "pbqp R1 reductions"); - ir_timer_t *t_r2 = ir_timer_register("be_pbqp_r2", "pbqp R2 reductions"); - ir_timer_t *t_rn = ir_timer_register("be_pbqp_rN", "pbqp RN reductions"); - - /* reset timers */ - ir_timer_reset(t_edge); - ir_timer_reset(t_r0); - ir_timer_reset(t_r1); - ir_timer_reset(t_r2); - ir_timer_reset(t_rn); + ir_timer_t *t_edge = ir_timer_new(); + ir_timer_t *t_r1 = ir_timer_new(); + ir_timer_t *t_r2 = ir_timer_new(); + ir_timer_t *t_rn = ir_timer_new(); #endif for (;;) { if (edge_bucket_get_length(edge_bucket) > 0) { #if KAPS_TIMING - ir_timer_start(t_r0); + ir_timer_start(t_edge); #endif apply_edge(pbqp); #if KAPS_TIMING - ir_timer_stop(t_r0); + ir_timer_stop(t_edge); #endif } else if (node_bucket_get_length(node_buckets[1]) > 0) { #if KAPS_TIMING @@ -321,11 +313,10 @@ static void apply_heuristic_reductions_co(pbqp *pbqp, plist_t *rpeo) #endif } else { #if KAPS_TIMING - printf("%-20s: %8.3lf msec\n", ir_timer_get_description(t_edge), (double)ir_timer_elapsed_usec(t_edge) / 1000.0); - printf("%-20s: %8.3lf msec\n", ir_timer_get_description(t_r0), (double)ir_timer_elapsed_usec(t_r0) / 1000.0); - printf("%-20s: %8.3lf msec\n", ir_timer_get_description(t_r1), (double)ir_timer_elapsed_usec(t_r1) / 1000.0); - printf("%-20s: %8.3lf msec\n", ir_timer_get_description(t_r2), (double)ir_timer_elapsed_usec(t_r2) / 1000.0); - printf("%-20s: %8.3lf msec\n", ir_timer_get_description(t_rn), (double)ir_timer_elapsed_usec(t_rn) / 1000.0); + printf("pbqp RE reductions: %8.3lf msec\n", (double)ir_timer_elapsed_usec(t_edge) / 1000.0); + printf("pbqp R1 reductions: %8.3lf msec\n", (double)ir_timer_elapsed_usec(t_r1) / 1000.0); + printf("pbqp R2 reductions: %8.3lf msec\n", (double)ir_timer_elapsed_usec(t_r2) / 1000.0); + printf("pbqp RN reductions: %8.3lf msec\n", (double)ir_timer_elapsed_usec(t_rn) / 1000.0); #endif return; @@ -353,9 +344,15 @@ void solve_pbqp_heuristical_co_ld(pbqp *pbqp, plist_t *rpeo) #if KAPS_STATISTIC fh = fopen("solutions.pb", "a"); - fprintf(fh, ": %lld RE:%u R0:%u R1:%u R2:%u RN/BF:%u\n", pbqp->solution, + #if KAPS_USE_UNSIGNED + fprintf(fh, ": %u RE:%u R0:%u R1:%u R2:%u RM:%u RN/BF:%u\n", pbqp->solution, pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2, - pbqp->num_rn); + pbqp->num_rm, pbqp->num_rn); + #else + fprintf(fh, ": %lld RE:%u R0:%u R1:%u R2:%u RM:%u RN/BF:%u\n", pbqp->solution, + pbqp->num_edges, pbqp->num_r0, pbqp->num_r1, pbqp->num_r2, + pbqp->num_rm, pbqp->num_rn); + #endif fclose(fh); #endif