X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbechordal.c;h=37a38373d09649119b2dfa6505d3a6c38d2ec824;hb=6082146d47925a3dbbc78da30ca0a89276457dce;hp=36d472cf55acd0c956c0439ec75b0e438699e420;hpb=f2c2e45eb4e677fef5bf6a8e418b2a22441172d5;p=libfirm diff --git a/ir/be/bechordal.c b/ir/be/bechordal.c index 36d472cf5..37a38373d 100644 --- a/ir/be/bechordal.c +++ b/ir/be/bechordal.c @@ -50,15 +50,15 @@ #include "beutil.h" #include "besched.h" -#include "besched_t.h" +#include "besched.h" #include "belive_t.h" -#include "benode_t.h" -#include "bearch_t.h" +#include "benode.h" +#include "bearch.h" #include "beirgmod.h" #include "beifg.h" #include "beinsn_t.h" #include "bestatevent.h" -#include "beirg_t.h" +#include "beirg.h" #include "beintlive_t.h" #include "bera.h" #include "bechordal_t.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); + } } /*