- reserve the IRN_LINK resource
[r23156]
irn_cost_pair* costs;
int i;
irn_cost_pair* costs;
int i;
- fc = malloc(sizeof(*fc) + sizeof(*fc->costs) * arity);
+ fc = xmalloc(sizeof(*fc) + sizeof(*fc->costs) * arity);
fc->no_root = 0;
costs = fc->costs;
fc->no_root = 0;
costs = fc->costs;
heights = heights_new(irg);
heights = heights_new(irg);
+ ir_reserve_resources(irg, IR_RESOURCE_IRN_LINK);
irg_walk_graph(irg, normal_cost_walker, NULL, NULL);
irg_walk_graph(irg, collect_roots, NULL, NULL);
inc_irg_visited(irg);
irg_block_walk_graph(irg, normal_sched_block, NULL, heights);
irg_walk_graph(irg, normal_cost_walker, NULL, NULL);
irg_walk_graph(irg, collect_roots, NULL, NULL);
inc_irg_visited(irg);
irg_block_walk_graph(irg, normal_sched_block, NULL, heights);
+ ir_free_resources(irg, IR_RESOURCE_IRN_LINK);