#define EPSILON 0.00001
#define SLOTS_LIVING 32
-/**
- * Represents the _costs_ if node n and m have different colors.
- * Must be >=0.
- **/
-#define get_weight(n,m) 1
-
typedef struct _simpl_t {
struct list_head chain;
if_node_t *ifn;
redo = 0;
for (ifn = set_first(if_nodes); ifn; ifn = set_next(if_nodes)) {
ir_node *irn = get_irn_for_graph_nr(pi->co->chordal_env->irg, ifn->nnr);
- if (!is_removed(irn) && !is_optimizable(irn) &&
+ if (!is_removed(irn) && !is_optimizable(pi->co->chordal_env->arch_env, irn) &&
!is_optimizable_arg(pi->co, irn) && pi_is_simplicial(pi, ifn)) {
simpl_t *s = xmalloc(sizeof(*s));
s->ifn = ifn;
DBG((dbg, LEVEL_2, "Add E constraints...\n"));
/* for all roots of optimization units */
list_for_each_entry(unit_t, curr, &pi->co->units, units) {
- const ir_node *root, *arg;
+ ir_node *root, *arg;
int rootnr, argnr, color;
int y_idx, i;
char buf[32];
/* Introduce new variable and set factor in objective function */
mangle_var(buf, 'y', rootnr, argnr);
- y_idx = lpp_add_var(pi->curr_lp, buf, continous, get_weight(root, arg));
+ y_idx = lpp_add_var(pi->curr_lp, buf, continous, curr->costs[i]);
+
/* set starting value */
//lpp_set_start_value(pi->curr_lp, y_idx, (get_irn_col(pi->co, root) != get_irn_col(pi->co, arg)));
int cst_idx, y_idx, i;
char buf[32];
- if (curr->ifg_mis_size == curr->node_count)
+ if (curr->minimal_costs == 0)
continue;
root = curr->nodes[0];
rootnr = get_irn_graph_nr(root);
mangle_cst(buf, 'M', cst_counter++);
- cst_idx = lpp_add_cst(pi->curr_lp, buf, greater, curr->node_count - curr->ifg_mis_size);
+ cst_idx = lpp_add_cst(pi->curr_lp, buf, greater, curr->minimal_costs);
/* for all arguments */
for (i = 1; i < curr->node_count; ++i) {
/* problem size reduction */
pi_find_simplicials(pi);
- //TODO dump_ifg_w/o_removed
+ //TODO If you wish to see it: dump_ifg_w/o_removed
if (pi->all_simplicial)
return pi;
dbg = firm_dbg_register("ir.be.copyoptilp");
if (!strcmp(co->name, DEBUG_IRG))
- firm_dbg_set_mask(dbg, -1);
+ firm_dbg_set_mask(dbg, DEBUG_LVL_ILP);
else
firm_dbg_set_mask(dbg, DEBUG_LVL);