X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbelive.c;h=200b118f16ba1c583af00e14526988e7f5b1f651;hb=afbbc0b1ccd684c4c24bfd43d0f994123245f39f;hp=f44d77449092ad0c1806e53df0eef07e542aa741;hpb=79c525957c65f251d66263891a3f53688fe0c736;p=libfirm diff --git a/ir/be/belive.c b/ir/be/belive.c index f44d77449..200b118f1 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. */ @@ -582,9 +585,8 @@ void be_liveness_invalidate(be_lv_t *lv) /* Compute the inter block liveness for a graph. */ be_lv_t *be_liveness(const be_irg_t *birg) { - be_lv_t *lv = xmalloc(sizeof(lv[0])); + be_lv_t *lv = XMALLOCZ(be_lv_t); - memset(lv, 0, sizeof(lv[0])); lv->irg = be_get_birg_irg(birg); lv->birg = birg; #ifdef USE_LIVE_CHK @@ -620,7 +622,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)