summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beprefalloc.c
diff options
context:
space:
mode:
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>2015-05-22 12:11:00 +0200
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>2015-06-02 11:08:17 +0200
commitc740a32e10376ab718d475441b3f75741c6ffdc4 (patch)
tree9db318c26725918d1a2136a2ab4d312a4e1b01da /ir/be/beprefalloc.c
parent621e1ef46ebd99532c75c15f365f99edd609d771 (diff)
Properly reserve and free link resource.
Diffstat (limited to 'ir/be/beprefalloc.c')
-rw-r--r--ir/be/beprefalloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ir/be/beprefalloc.c b/ir/be/beprefalloc.c
index 5e8ba51..70475b3 100644
--- a/ir/be/beprefalloc.c
+++ b/ir/be/beprefalloc.c
@@ -1672,6 +1672,7 @@ static void determine_block_order(void)
size_t order_p = 0;
/* clear block links... */
+ ir_reserve_resources(irg, IR_RESOURCE_IRN_LINK);
for (size_t p = 0; p < n_blocks; ++p) {
ir_node *block = blocklist[p];
set_irn_link(block, NULL);
@@ -1749,7 +1750,7 @@ static void determine_block_order(void)
assert(order_p == n_blocks);
del_pdeq(worklist);
- ir_free_resources(irg, IR_RESOURCE_BLOCK_VISITED);
+ ir_free_resources(irg, IR_RESOURCE_IRN_LINK | IR_RESOURCE_BLOCK_VISITED);
DEL_ARR_F(blocklist);