X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Fircfscc.c;h=18cd22b4226a452861fe4a15974aecd7a11f1dd5;hb=109a60bfcf239f2b5304c709a430658920c287cf;hp=8feda3aa3477a486f9a89a8c31e16e2b5ae8c91c;hpb=84eb51069f9b6daf39f78c37d56df2fb0d2397b0;p=libfirm diff --git a/ir/ana/ircfscc.c b/ir/ana/ircfscc.c index 8feda3aa3..18cd22b42 100644 --- a/ir/ana/ircfscc.c +++ b/ir/ana/ircfscc.c @@ -163,6 +163,12 @@ static INLINE void init_stack(void) { tos = 0; } +static void finish_stack(void) +{ + DEL_ARR_F(stack); + stack = NULL; +} + /** * Push a node n onto the IR-node stack. */ @@ -296,6 +302,11 @@ static INLINE void init_scc(ir_graph *irg, struct obstack *obst) { irg_walk_graph(irg, init_node, NULL, obst); } +static INLINE void finish_scc(void) +{ + finish_stack(); +} + #ifdef INTERPROCEDURAL_VIEW /** * Initializes the scc algorithm for the interprocedural case. @@ -655,6 +666,7 @@ int construct_cf_backedges(ir_graph *irg) { if (is_Block(el)) cfscc(el); } + finish_scc(); obstack_free(&temp, NULL); assert(head_rem == current_loop);