X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbechordal.c;h=37a38373d09649119b2dfa6505d3a6c38d2ec824;hb=a8029325c2313fe536c3b23c59cf92fa145840a4;hp=8ad71c1539ec96f0d592781b36d901dcca7fe0e4;hpb=d2c1b0191844c3c23731158a153838d570dcd65a;p=libfirm diff --git a/ir/be/bechordal.c b/ir/be/bechordal.c index 8ad71c153..37a38373d 100644 --- a/ir/be/bechordal.c +++ b/ir/be/bechordal.c @@ -52,7 +52,7 @@ #include "besched.h" #include "besched.h" #include "belive_t.h" -#include "benode_t.h" +#include "benode.h" #include "bearch.h" #include "beirgmod.h" #include "beifg.h" @@ -127,11 +127,10 @@ static inline border_t *border_add(be_chordal_env_t *env, struct list_head *head if (!is_def) { border_t *def; - b = obstack_alloc(env->obst, sizeof(*b)); + b = OALLOC(env->obst, border_t); /* also allocate the def and tie it to the use. */ - def = obstack_alloc(env->obst, sizeof(*def)); - memset(def, 0, sizeof(*def)); + def = OALLOCZ(env->obst, border_t); b->other_end = def; def->other_end = b; @@ -334,7 +333,7 @@ static ir_node *pre_process_constraints(be_chordal_alloc_env_t *alloc_env, * since ignore-nodes are not Perm'ed. */ if (op->has_constraints && is_Proj(proj) && get_Proj_pred(proj) == perm) { - be_set_constr_limited(perm, BE_OUT_POS(get_Proj_proj(proj)), op->req); + be_set_constr_out(perm, get_Proj_proj(proj), op->req); } } @@ -630,7 +629,7 @@ static void pressure(ir_node *block, void *env_ptr) bitset_clear_all(live); /* Set up the border list in the block info */ - head = obstack_alloc(env->obst, sizeof(*head)); + head = OALLOC(env->obst, struct list_head); INIT_LIST_HEAD(head); assert(pmap_get(env->border_heads, block) == NULL); pmap_insert(env->border_heads, block, head); @@ -674,17 +673,17 @@ static void pressure(ir_node *block, void *env_ptr) border_def(proj, step, 1); } } - } - - /* - * If the node defines some value, which can put into a - * register of the current class, make a border for it. - */ - if (has_reg_class(env, irn)) { - int nr = get_irn_idx(irn); - - bitset_clear(live, nr); - border_def(irn, step, 1); + } else { + /* + * If the node defines some value, which can put into a + * register of the current class, make a border for it. + */ + if (has_reg_class(env, irn)) { + int nr = get_irn_idx(irn); + + bitset_clear(live, nr); + border_def(irn, step, 1); + } } /*