summaryrefslogtreecommitdiffhomepage
path: root/ir/be/becopyilp2.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-12-19 13:51:13 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2012-12-19 17:58:39 +0100
commit58765e7aeba88d7770af0afded018447a6d135cc (patch)
treec85685fd445f3843cbf02edd129b054e80ab48b3 /ir/be/becopyilp2.c
parentac14a2bcdba00bd96c0fe5922d5b8f105ffdcb2b (diff)
becopyilp: Use the set of admissible registers from bechordal.
Diffstat (limited to 'ir/be/becopyilp2.c')
-rw-r--r--ir/be/becopyilp2.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/ir/be/becopyilp2.c b/ir/be/becopyilp2.c
index 455fa1a..bd28665 100644
--- a/ir/be/becopyilp2.c
+++ b/ir/be/becopyilp2.c
@@ -598,26 +598,18 @@ static void ilp2_apply(ilp_env_t *ienv)
*/
static int co_solve_ilp2(copy_opt_t *co)
{
- unsigned n_regs = arch_register_class_n_regs(co->cls);
- lpp_sol_state_t sol_state;
- ilp_env_t *ienv;
- local_env_t my;
-
ASSERT_OU_AVAIL(co); //See build_clique_st
ASSERT_GS_AVAIL(co);
- my.first_x_var = -1;
- my.last_x_var = -1;
FIRM_DBG_REGISTER(dbg, "firm.be.coilp2");
- unsigned *const allocatable_colors = rbitset_alloca(n_regs);
- be_set_allocatable_regs(co->irg, co->cls, allocatable_colors);
- my.allocatable_colors = allocatable_colors;
-
- ienv = new_ilp_env(co, ilp2_build, ilp2_apply, &my);
-
- sol_state = ilp_go(ienv);
+ local_env_t my;
+ my.first_x_var = -1;
+ my.last_x_var = -1;
+ my.allocatable_colors = co->cenv->allocatable_regs->data;
+ ilp_env_t *const ienv = new_ilp_env(co, ilp2_build, ilp2_apply, &my);
+ lpp_sol_state_t const sol_state = ilp_go(ienv);
free_ilp_env(ienv);
return sol_state == lpp_optimal;