/** Accessing the out datastructures **/
/*--------------------------------------------------------------------*/
+#ifdef DEBUG_libfirm
/** Clear the outs of a node */
static void reset_outs (ir_node *node, void *unused)
{
node->out = NULL;
-#ifdef DEBUG_libfirm
node->out_valid = 0;
-#endif /* defined DEBUG_libfirm */
}
+#endif
/* returns the number of successors of the node: */
int get_irn_n_outs (ir_node *node) {
if (current_ir_graph->outs_state != outs_none)
free_irg_outs(current_ir_graph);
- current_ir_graph->outs_state = outs_consistent;
/* This first iteration counts the overall number of out edges and the
number of out edges for each node. */
the out block walker. */
fix_start_proj(irg);
+ current_ir_graph->outs_state = outs_consistent;
current_ir_graph = rem;
}
+void assure_irg_outs(ir_graph *irg) {
+ if (get_irg_outs_state(irg) != outs_consistent)
+ compute_irg_outs(irg);
+}
+
void compute_irp_outs(void) {
int i, n_irgs = get_irp_n_irgs();
for (i = 0; i < n_irgs; ++i)