static ir_loop *new_loop(void)
{
ir_loop *father = current_loop;
- ir_loop *son = alloc_loop(father, outermost_ir_graph->obst);
+ ir_loop *son = alloc_loop(father, get_irg_obstack(outermost_ir_graph));
if (son->depth > max_loop_depth) max_loop_depth = son->depth;
current_loop = son;
}
/**
- * Check weather a given node represents the outer most Start
+ * Check whether a given node represents the outermost Start
* block. In intra-procedural view this is the start block of the
* current graph, in interprocedural view it is the start block
* of the outer most graph.
means not reachable.
I.e., with this code, the order on the loop tree is correct. But a
(single) test showed the loop tree is deeper. */
- if (get_irn_op(n) == op_Phi ||
- is_Block(n) ||
+ if (is_Phi(n) ||
+ is_Block(n) ||
(get_irg_pinned(get_irn_irg(n)) == op_pin_state_floats &&
get_irn_pinned(n) == op_pin_state_floats))
// Here we could test for backedge at -1 which is illegal
*/
static inline int is_possible_loop_head(ir_node *n)
{
- ir_op *op = get_irn_op(n);
- return ((op == op_Block) ||
- (op == op_Phi));
+ return is_Block(n) || is_Phi(n);
}
/**
obstack_free(&temp, NULL);
assert(head_rem == current_loop);
- mature_loops(current_loop, irg->obst);
+ mature_loops(current_loop, get_irg_obstack(irg));
set_irg_loop(irg, current_loop);
- set_irg_state(irg, IR_GRAPH_STATE_CONSISTENT_LOOPINFO);
+ add_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_LOOPINFO);
assert(get_irg_loop(irg)->kind == k_ir_loop);
current_ir_graph = rem;
return max_loop_depth;
*/
irg_walk_graph(irg, loop_reset_node, NULL, NULL);
set_irg_loop(irg, NULL);
- clear_irg_state(current_ir_graph, IR_GRAPH_STATE_CONSISTENT_LOOPINFO);
+ clear_irg_properties(current_ir_graph, IR_GRAPH_PROPERTY_CONSISTENT_LOOPINFO);
/* We cannot free the loop nodes, they are on the obstack. */
}