* @brief ILP based copy minimization.
* @author Daniel Grund
* @date 28.02.2006
- * @version $Id$
*
* ILP formalization using G=(V, E, Q):
* - 2 class of variables: coloring vars x_ic and equal color vars y_ij
#include "raw_bitset.h"
#include "pdeq.h"
-#include "irtools.h"
+#include "util.h"
#include "irgwalk.h"
#include "becopyilp_t.h"
#include "beifg.h"
pmap_insert(lenv->nr_2_irn, INT_TO_PTR(node_nr), irn);
- req = arch_get_register_req_out(irn);
+ req = arch_get_irn_register_req(irn);
bitset_clear_all(colors);
/* for all colors */
for (col=0; col<n_colors; ++col) {
- int cst_idx = lpp_add_cst(lpp, NULL, lpp_less, 1.0);
+ int cst_idx = lpp_add_cst(lpp, NULL, lpp_less_equal, 1.0);
/* for each member of this clique */
for (i=0; i<size; ++i) {
/* add constraints relating the affinity var to the color vars */
for (col=0; col<n_colors; ++col) {
- int cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_less, 0.0);
+ int cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_less_equal, 0.0);
root_idx = lpp_get_var_idx(ienv->lp, name_cdd(buf, 'x', root_nr, col));
arg_idx = lpp_get_var_idx(ienv->lp, name_cdd(buf, 'x', arg_nr, col));
int var_idx, cst_idx, center_nr, member_nr;
char buf[16];
- cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_greater, pset_count(clique)-1);
+ cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_greater_equal, pset_count(clique)-1);
center_nr = get_irn_idx(center);
pset_foreach(clique, member) {
/* And a path of length 2 is covered by a clique star constraint. */
if (len > 2) {
/* finally build the constraint */
- int cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_greater, 1.0);
+ int cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_greater_equal, 1.0);
for (i=1; i<len; ++i) {
char buf[16];
int nr_1 = get_irn_idx(curr_path[i-1]);
local_env_t *lenv = ienv->env;
int lower_bound;
- ienv->lp = new_lpp(ienv->co->name, lpp_minimize);
+ ienv->lp = lpp_new(ienv->co->name, lpp_minimize);
build_coloring_cstr(ienv);
build_interference_cstr(ienv);
build_affinity_cstr(ienv);