X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Fbe%2Fbecopyilp2.c;h=95e6b42d6f7e8b46f614f1977e4e0a2dbc983c6a;hb=fef8dc3eff6468d7d65485af8e1ac9884c504e1a;hp=cf819a5950ae0555c70891c799df6ccf82988830;hpb=929bd10ba046d7482e572d97ec592a4055c65970;p=libfirm diff --git a/ir/be/becopyilp2.c b/ir/be/becopyilp2.c index cf819a595..95e6b42d6 100644 --- a/ir/be/becopyilp2.c +++ b/ir/be/becopyilp2.c @@ -70,11 +70,8 @@ static unsigned check_alignment_constraints(ir_node *node) { const arch_register_req_t *req = arch_get_irn_register_req(node); // For larger than 1 variables, support only aligned constraints - assert(((!(req->type & arch_register_req_type_aligned) - && req->width == 1) - || (req->type & arch_register_req_type_aligned)) - && "Unaligned large (width > 1) variables not supported"); - return (req->type & arch_register_req_type_aligned) && req->width > 1; + assert((arch_register_req_is(req, aligned) || req->width == 1) && "Unaligned large (width > 1) variables not supported"); + return arch_register_req_is(req, aligned) && req->width > 1; } static void make_color_var_name(char *buf, size_t buf_size, @@ -91,12 +88,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 +612,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 +624,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;