summaryrefslogtreecommitdiffhomepage
path: root/ir/be/becopyilp2.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-11-25 17:05:24 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2012-11-25 17:06:53 +0100
commit0e5195711161c7a5d6b841cb614c10f58b216fa8 (patch)
tree26c5c146452f7c05ac3df7735c436be299d22e33 /ir/be/becopyilp2.c
parent1413c4ff7c5ab24ee75242c2192d1c7a93a178b4 (diff)
rbitset: Let rbitset_alloca() return the new raw bitset.
Diffstat (limited to 'ir/be/becopyilp2.c')
-rw-r--r--ir/be/becopyilp2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ir/be/becopyilp2.c b/ir/be/becopyilp2.c
index cf819a5..0f95251 100644
--- a/ir/be/becopyilp2.c
+++ b/ir/be/becopyilp2.c
@@ -91,12 +91,10 @@ static void build_coloring_cstr(ilp_env_t *ienv)
unsigned n_regs = arch_register_class_n_regs(ienv->co->cls);
const unsigned *allocatable_colors = lenv->allocatable_colors;
nodes_iter_t iter;
- unsigned *colors;
ir_node *irn;
char buf[32];
- rbitset_alloca(colors, n_regs);
-
+ unsigned *const colors = rbitset_alloca(n_regs);
be_ifg_foreach_node(ifg, &iter, irn) {
const arch_register_req_t *req;
unsigned col;
@@ -617,7 +615,6 @@ static void ilp2_apply(ilp_env_t *ienv)
*/
static int co_solve_ilp2(copy_opt_t *co)
{
- unsigned *allocatable_colors;
unsigned n_regs = arch_register_class_n_regs(co->cls);
lpp_sol_state_t sol_state;
ilp_env_t *ienv;
@@ -630,7 +627,7 @@ static int co_solve_ilp2(copy_opt_t *co)
my.last_x_var = -1;
FIRM_DBG_REGISTER(dbg, "firm.be.coilp2");
- rbitset_alloca(allocatable_colors, n_regs);
+ unsigned *const allocatable_colors = rbitset_alloca(n_regs);
be_set_allocatable_regs(co->irg, co->cls, allocatable_colors);
my.allocatable_colors = allocatable_colors;