- height = obstack_alloc(&heights->obst, sizeof(*height));
- memset(height, 0, sizeof(*height));
+ height = OALLOCZ(&heights->obst, irn_height_t);
if (h_curr->visited >= h->visited)
return false;
/* If we are too deep into the DAG we won't find the target either. */
if (h_curr->visited >= h->visited)
return false;
/* If we are too deep into the DAG we won't find the target either. */
- irn_height_t *hn = get_height_data(h, n);
- irn_height_t *hm = get_height_data(h, m);
+ irn_height_t *hn = maybe_get_height_data(h, n);
+ irn_height_t *hm = maybe_get_height_data(h, m);
unsigned heights_recompute_block(ir_heights_t *h, ir_node *block)
{
ir_graph *irg = get_irn_irg(block);
unsigned heights_recompute_block(ir_heights_t *h, ir_node *block)
{
ir_graph *irg = get_irn_irg(block);
foreach_out_edge(block, edge) {
ir_node *irn = get_edge_src_irn(edge);
irn_height_t *ih = get_height_data(h, irn);
foreach_out_edge(block, edge) {
ir_node *irn = get_edge_src_irn(edge);
irn_height_t *ih = get_height_data(h, irn);
ir_nodemap_init(&res->data, irg);
obstack_init(&res->obst);
res->dump_handle = dump_add_node_info_callback(height_dump_cb, res);
ir_nodemap_init(&res->data, irg);
obstack_init(&res->obst);
res->dump_handle = dump_add_node_info_callback(height_dump_cb, res);
irg_block_walk_graph(irg, compute_heights_in_block_walker, NULL, res);
return res;
irg_block_walk_graph(irg, compute_heights_in_block_walker, NULL, res);
return res;