+ make_color_var_name(buf, sizeof(buf), irn, col);
+ var_idx = lpp_add_var(ienv->lp, buf, lpp_binary, 0.0);
+ lpp_set_factor_fast(ienv->lp, cst_idx, var_idx, 1);
+
+ val = (col == curr_node_color) ? 1.0 : 0.0;
+ lpp_set_start_value(ienv->lp, var_idx, val);
+
+ lenv->last_x_var = var_idx;
+ if (lenv->first_x_var == -1)
+ lenv->first_x_var = var_idx;
+ }
+
+ /* add register constraint constraints */
+ for (col = 0; col < n_regs; ++col) {
+ int cst_idx;
+ int var_idx;
+ if (rbitset_is_set(colors, col)
+ // for aligned variable, we set the unaligned part to 0
+ && (!has_alignment_cstr || ((col % req->width) == 0)))
+ continue;
+
+ make_color_var_name(buf, sizeof(buf), irn, col);
+ cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_equal, 0.0);
+ var_idx = lpp_add_var(ienv->lp, buf, lpp_binary, 0.0);
+ lpp_set_start_value(ienv->lp, var_idx, 0.0);
+ lpp_set_factor_fast(ienv->lp, cst_idx, var_idx, 1);
+
+ lenv->last_x_var = var_idx;
+ }
+ }
+}
+
+static void build_interference_cstr(ilp_env_t *ienv)
+{
+ lpp_t *lpp = ienv->lp;
+ local_env_t *lenv = (local_env_t*)ienv->env;
+ be_ifg_t *ifg = ienv->co->cenv->ifg;
+ unsigned n_colors = arch_register_class_n_regs(ienv->co->cls);
+ ir_node **clique = ALLOCAN(ir_node*, n_colors);
+ const unsigned *allocatable_colors = lenv->allocatable_colors;
+ cliques_iter_t iter;
+ int size;
+ unsigned col;
+ int i;