#include <lpp/lpp.h>
#include <lpp/lpp_net.h>
+#include <lpp/lpp_cplex.h>
#include "be_t.h"
#include "belive_t.h"
#define DBG_LEVEL SET_LEVEL_3
-#define DUMP_SOLUTION
-#define DUMP_ILP
+#undef DUMP_SOLUTION
+#undef DUMP_ILP
#define LPP_SERVER "i44pc52"
#define LPP_SOLVER "cplex"
step++;
}
+ if(bl == get_irg_start_block(get_irn_irg(bl)))
+ goto end;
+
/*
* Here, only the phis in the block and the values live in are in the
* live set.
}
}
+end:
+
del_pset(live);
}
/* Go through all live ranges of the node. */
list_for_each_entry(live_range_t, lr, &uh->head, list) {
int spilled = is_spilled(si, lr);
- int rematd = !is_zero(lpp_get_var_sol(si->lpp, lr->is_remat_var));
+ // int rematd = !is_zero(lpp_get_var_sol(si->lpp, lr->is_remat_var));
if(spilled && !is_end_of_block_use(lr)) {
ir_node *bl = get_nodes_block(lr->user);
si.enable_store = 0;
firm_dbg_set_mask(si.dbg, DBG_LEVEL);
- irg_block_walk_graph(session_env->irg, process_block, NULL, &si);
+ irg_block_walk_graph(session_env->irg, process_block, NULL, &si);
if(si.enable_store)
add_store_costs(&si);
- DBG((si.dbg, LEVEL_1, "%F\n", session_env->irg));
- lpp_solve_net(si.lpp, LPP_SERVER, LPP_SOLVER);
- assert(lpp_is_sol_valid(si.lpp) && "ILP not feasible");
-
- // assert(lpp_is_sol_valid(si.lpp) && "solution of ILP must be valid");
-
- DBG((si.dbg, LEVEL_1, "\tnodes: %d, vars: %d, csts: %d\n",
- set_count(si.irn_use_heads), si.lpp->var_next, si.lpp->cst_next));
- DBG((si.dbg, LEVEL_1, "\titerations: %d, solution time: %g\n",
- si.lpp->iterations, si.lpp->sol_time));
-
#ifdef DUMP_ILP
{
FILE *f;
}
#endif
+ DBG((si.dbg, LEVEL_1, "%F\n", session_env->irg));
+// lpp_solve_net(si.lpp, LPP_SERVER, LPP_SOLVER);
+ lpp_solve_cplex(si.lpp);
+ assert(lpp_is_sol_valid(si.lpp) && "ILP not feasible");
+
+ assert(lpp_is_sol_valid(si.lpp) && "solution of ILP must be valid");
+
+ DBG((si.dbg, LEVEL_1, "\tnodes: %d, vars: %d, csts: %d\n",
+ set_count(si.irn_use_heads), si.lpp->var_next, si.lpp->cst_next));
+ DBG((si.dbg, LEVEL_1, "\titerations: %d, solution time: %g\n",
+ si.lpp->iterations, si.lpp->sol_time));
+
#ifdef DUMP_SOLUTION
{
FILE *f;