fixed debug output of unary x87 nodes
[libfirm] / ir / be / becopyopt.c
index f13a838..316e31a 100644 (file)
@@ -73,6 +73,7 @@ static const lc_opt_enum_mask_items_t style_items[] = {
 };
 
 static const lc_opt_enum_mask_items_t algo_items[] = {
+       { "none",   CO_ALGO_NONE  },
        { "heur",   CO_ALGO_HEUR  },
        { "heur2",  CO_ALGO_HEUR2 },
        { "heur3",  CO_ALGO_HEUR3 },
@@ -124,7 +125,9 @@ void co_register_options(lc_opt_entry_t *grp)
 
        be_co2_register_options(co_grp);
        be_co3_register_options(co_grp);
+#ifdef WITH_ILP
        be_co_ilp_register_options(co_grp);
+#endif
 }
 #endif
 
@@ -1071,7 +1074,6 @@ static void appel_inter_block_aff(ir_node *bl, void *data)
 
                for(j = 0, n = get_Block_n_cfgpreds(bl); j < n; ++j) {
                        ir_node *pred  = get_Block_cfgpred_block(bl, j);
-                       appel_block_info_t *pred_bli = phase_get_irn_data(&env->ph, pred);
 
                        int nr = appel_get_live_end_nr(env, pred, irn);
                        assert(nr >= 0);
@@ -1084,7 +1086,6 @@ static void appel_inter_block_aff(ir_node *bl, void *data)
 
                for(j = 0, n = get_Block_n_cfgpreds(bl); j < n; ++j) {
                        ir_node *pred  = get_Block_cfgpred_block(bl, j);
-                       appel_block_info_t *pred_bli = phase_get_irn_data(&env->ph, pred);
                        ir_node *op = get_irn_n(irn, j);
 
                        int nr = appel_get_live_end_nr(env, pred, op);
@@ -1228,7 +1229,7 @@ static void ifg_dump_node_attr(FILE *f, void *self, ir_node *irn)
        }
 
        else
-               fprintf(f, "label=\"\"" );
+               fprintf(f, "label=\"\" shape=point " );
 
        if(env->flags & CO_IFG_DUMP_SHAPE)
                fprintf(f, "shape=%s ", limited ? "diamond" : "ellipse");
@@ -1249,7 +1250,7 @@ static void ifg_dump_at_end(FILE *file, void *self)
 
                co_gs_foreach_neighb(a, n) {
                        const arch_register_t *nr = arch_get_irn_register(env->co->aenv, n->irn);
-                       int nidx = get_irn_idx(n->irn);
+                       unsigned nidx = get_irn_idx(n->irn);
 
                        if(aidx < nidx) {
                                const char *color = nr == ar ? "blue" : "red";
@@ -1293,8 +1294,9 @@ void co_solve_park_moon(copy_opt_t *opt)
 
 }
 
-static void void_algo(copy_opt_t *co)
+static int void_algo(copy_opt_t *co)
 {
+       return 0;
 }
 
 /*
@@ -1311,7 +1313,9 @@ static co_algo_t *algos[] = {
        co_solve_heuristic,
        co_solve_heuristic_new,
        co_solve_heuristic_java,
+#ifdef WITH_ILP
        co_solve_ilp2
+#endif
 };
 
 /*
@@ -1327,6 +1331,7 @@ void co_driver(be_chordal_env_t *cenv)
 {
        copy_opt_t *co;
        co_algo_t  *algo_func;
+       int init_costs;
 
        if(algo < 0 || algo >= CO_ALGO_LAST)
                return;
@@ -1334,11 +1339,7 @@ void co_driver(be_chordal_env_t *cenv)
        co = new_copy_opt(cenv, cost_func);
        co_build_ou_structure(co);
        co_build_graph_structure(co);
-       if(do_stats) {
-               ir_printf("%30F %10s %7d%7d%7d%7d", cenv->irg, cenv->cls->name,
-                               co_get_max_copy_costs(co), co_get_copy_costs(co),
-                               co_get_inevit_copy_costs(co), co_get_lower_bound(co));
-       }
+       init_costs = co_get_copy_costs(co);
 
        /* Dump the interference graph in Appel's format. */
        if(dump_flags & DUMP_APPEL) {
@@ -1367,10 +1368,14 @@ void co_driver(be_chordal_env_t *cenv)
                int remaining         = co_get_copy_costs(co);
                int evitable          = remaining - co_get_lower_bound(co);
 
+               ir_printf("%30F %10s %10d%10d%10d%10d", cenv->irg, cenv->cls->name,
+                               co_get_max_copy_costs(co), init_costs,
+                               co_get_inevit_copy_costs(co), co_get_lower_bound(co));
+
                if(optimizable_costs > 0)
-                       printf("%5d %5.2f\n", remaining, (evitable * 100.0) / optimizable_costs);
+                       printf("%10d %5.2f\n", remaining, (evitable * 100.0) / optimizable_costs);
                else
-                       printf("%5d %5s\n", remaining, "-");
+                       printf("%10d %5s\n", remaining, "-");
        }
 
        co_free_graph_structure(co);