X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeirg.c;h=11d402c66944ae0917d1b451712eeed8917cf95d;hb=5427ad0b567409445284277a9c48d652179755ea;hp=c19bac69d8c63c3cb6689330e4433f060080dd73;hpb=d2c1b0191844c3c23731158a153838d570dcd65a;p=libfirm diff --git a/ir/be/beirg.c b/ir/be/beirg.c index c19bac69d..11d402c66 100644 --- a/ir/be/beirg.c +++ b/ir/be/beirg.c @@ -32,24 +32,27 @@ #include "belive.h" #include "bedomfront.h" -be_lv_t *be_assure_liveness(be_irg_t *birg) +be_lv_t *be_assure_liveness(ir_graph *irg) { + be_irg_t *birg = be_birg_from_irg(irg); if (birg->lv != NULL) return birg->lv; return birg->lv = be_liveness(birg->irg); } -void be_assure_dom_front(be_irg_t *birg) +void be_assure_dom_front(ir_graph *irg) { + be_irg_t *birg = be_birg_from_irg(irg); if (birg->dom_front != NULL) return; birg->dom_front = be_compute_dominance_frontiers(birg->irg); } -void be_invalidate_dom_front(be_irg_t *birg) +void be_invalidate_dom_front(ir_graph *irg) { + be_irg_t *birg = be_birg_from_irg(irg); if (birg->dom_front == NULL) return; @@ -57,8 +60,9 @@ void be_invalidate_dom_front(be_irg_t *birg) birg->dom_front = NULL; } -void be_free_birg(be_irg_t *birg) +void be_free_birg(ir_graph *irg) { + be_irg_t *birg = be_birg_from_irg(irg); free_execfreq(birg->exec_freq); birg->exec_freq = NULL; @@ -70,4 +74,7 @@ void be_free_birg(be_irg_t *birg) be_liveness_free(birg->lv); birg->lv = NULL; } + + obstack_free(&birg->obst, NULL); + irg->be_data = NULL; }