Added phi perm inserter
[libfirm] / ir / be / becopyilp.c
index 4785b19..2e34e2f 100644 (file)
@@ -28,7 +28,6 @@
 #define LPP_SOLVER "cplex"
 
 #undef DUMP_MPS
-#define DEBUG_LVL SET_LEVEL_1
 static firm_dbg_module_t *dbg = NULL;
 
 #define MAX(a,b) ((a<b)?(b):(a))
@@ -348,13 +347,13 @@ static void pi_add_constr_S(problem_instance_t *pi) {
                int cst_idx, y_idx, i;
                char buf[32];
 
-               if (curr->minimal_costs == 0)
+               if (curr->min_nodes_costs == 0)
                        continue;
 
                root = curr->nodes[0];
                rootnr = get_irn_graph_nr(root);
                mangle_cst(buf, 'S', cst_counter++);
-               cst_idx = lpp_add_cst(pi->curr_lp, buf, lpp_greater, curr->minimal_costs);
+               cst_idx = lpp_add_cst(pi->curr_lp, buf, lpp_greater, curr->min_nodes_costs);
 
                /* for all arguments */
                for (i = 1; i < curr->node_count; ++i) {
@@ -382,6 +381,10 @@ static INLINE int get_costs(problem_instance_t *pi, ir_node *phi, ir_node *irn)
        return 0;
 }
 
+/*
+ * TODO: Because this here uses a phi-walker and not the ou's,
+ * it is possible, that the interfering args of a phi will cause a bug ??!!
+ */
 static void M_constr_walker(ir_node *block, void *env) {
        problem_instance_t *pi = env;
        int count, arity, row, col, other_row, *costs;
@@ -639,9 +642,9 @@ void co_ilp_opt(copy_opt_t *co) {
 
        dbg = firm_dbg_register("ir.be.copyoptilp");
        if (!strcmp(co->name, DEBUG_IRG))
-               firm_dbg_set_mask(dbg, DEBUG_LVL_ILP);
+               firm_dbg_set_mask(dbg, DEBUG_IRG_LVL_ILP);
        else
-               firm_dbg_set_mask(dbg, DEBUG_LVL);
+               firm_dbg_set_mask(dbg, DEBUG_LVL_ILP);
 
        pi = new_pi(co);
        if (!pi->all_simplicial) {