X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbelive.c;h=ead176e0ed6def393517a054a61799c7c8beba71;hb=0b1140d1887f497ef413709e5cda2608f2cd1017;hp=a2166db0c5dc2424755a15d34193756a85892932;hpb=57fb9fc8605ae538d91ca191301e0d3c111cc3ba;p=libfirm diff --git a/ir/be/belive.c b/ir/be/belive.c index a2166db0c..ead176e0e 100644 --- a/ir/be/belive.c +++ b/ir/be/belive.c @@ -28,6 +28,9 @@ #include "config.h" #endif +/* statev is expensive here, only enable when needed */ +#define DISABLE_STATEV + #include "impl.h" #include "iredges_t.h" #include "irgwalk.h" @@ -525,7 +528,7 @@ static void compute_liveness(be_lv_t *lv) /* * inserting the variables sorted by their ID is probably * more efficient since the binary sorted set insertion - * will not need to move arounf the data. + * will not need to move around the data. * However, if sorting the variables a priori pays off * needs to be checked, hence the define. */ @@ -599,15 +602,14 @@ be_lv_t *be_liveness(const be_irg_t *birg) void be_liveness_recompute(be_lv_t *lv) { - BE_TIMER_PUSH(t_live); + unsigned last_idx; - unsigned last_idx = get_irg_last_idx(lv->irg); + BE_TIMER_PUSH(t_live); + last_idx = get_irg_last_idx(lv->irg); if(last_idx >= bitset_size(lv->nodes)) { bitset_free(lv->nodes); lv->nodes = bitset_malloc(last_idx * 2); - } - - else + } else bitset_clear_all(lv->nodes); phase_free(&lv->ph); @@ -621,7 +623,11 @@ void be_liveness_recompute(be_lv_t *lv) void be_liveness_free(be_lv_t *lv) { be_liveness_invalidate(lv); - free(lv); +#ifdef USE_LIVE_CHK + lv_chk_free(lv->lvc); + dfs_free(lv->dfs); +#endif + xfree(lv); } void be_liveness_remove(be_lv_t *lv, const ir_node *irn) @@ -805,9 +811,7 @@ void be_liveness_transfer(const arch_env_t *arch_env, ir_nodeset_remove(nodeset, proj); } } - } - - if (arch_irn_consider_in_reg_alloc(arch_env, cls, node)) { + } else if (arch_irn_consider_in_reg_alloc(arch_env, cls, node)) { ir_nodeset_remove(nodeset, node); }