X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbespillbelady.c;h=768ece1d25f56daa14d35a8aa873f5f4e5c33e0e;hb=5efe7ce7c1754fb95defcc569412b2498fcfe436;hp=68256bb85ad5de9018ac35acfcbbb9da4f7a71bc;hpb=bb9f2e36362333c6635b89f5258171b06c786608;p=libfirm diff --git a/ir/be/bespillbelady.c b/ir/be/bespillbelady.c index 68256bb85..768ece1d2 100644 --- a/ir/be/bespillbelady.c +++ b/ir/be/bespillbelady.c @@ -280,11 +280,10 @@ static inline unsigned get_distance(ir_node *from, unsigned from_step, const ir_node *def, int skip_from_uses) { be_next_use_t use; - int flags = arch_irn_get_flags(def); unsigned costs; unsigned time; - assert(! (flags & arch_irn_flags_ignore)); + assert(!arch_irn_is_ignore(def)); use = be_get_next_use(uses, from, from_step, def, skip_from_uses); time = use.time; @@ -292,7 +291,7 @@ static inline unsigned get_distance(ir_node *from, unsigned from_step, return USES_INFINITY; /* We have to keep nonspillable nodes in the workingset */ - if (flags & arch_irn_flags_dont_spill) + if (arch_irn_get_flags(def) & arch_irn_flags_dont_spill) return 0; /* give some bonus to rematerialisable nodes */ @@ -316,8 +315,8 @@ static inline unsigned get_distance(ir_node *from, unsigned from_step, */ static void displace(workset_t *new_vals, int is_usage) { - ir_node **to_insert = alloca(n_regs * sizeof(to_insert[0])); - bool *spilled = alloca(n_regs * sizeof(spilled[0])); + ir_node **to_insert = ALLOCAN(ir_node*, n_regs); + bool *spilled = ALLOCAN(bool, n_regs); ir_node *val; int i; int len; @@ -551,7 +550,7 @@ static void decide_start_workset(const ir_node *block) /* check predecessors */ arity = get_irn_arity(block); - pred_worksets = alloca(sizeof(pred_worksets[0]) * arity); + pred_worksets = ALLOCAN(workset_t*, arity); all_preds_known = true; for(i = 0; i < arity; ++i) { ir_node *pred_block = get_Block_cfgpred_block(block, i);