3 * Public header for the automatically updating outs.
4 * @author Sebastian Hack
13 #ifndef _IR_EDGE_TYPEDEF_
14 #define _IR_EDGE_TYPEDEF_
15 typedef struct _ir_edge_t ir_edge_t;
19 * Get the first edge pointing to some node.
20 * @note There is no order on out edges. First in this context only
21 * means, that you get some starting point into the list of edges.
22 * @param irn The node.
23 * @return The first out edge that points to this node.
25 const ir_edge_t *get_irn_out_edge_first(const ir_node *irn);
28 * Get the next edge in the out list of some node.
29 * @param irn The node.
30 * @param last The last out edge you have seen.
31 * @return The next out edge in @p irn 's out list after @p last.
33 const ir_edge_t *get_irn_out_edge_next(const ir_node *irn,
34 const ir_edge_t *last);
37 * A convenience iteration macro over all out edges of a node.
38 * @param irn The node.
39 * @param edge An @c ir_edge_t pointer which shall be set to the current
42 #define foreach_out_edge(irn,edge) \
43 for(edge = get_irn_out_edge_first(irn); edge; edge = get_irn_out_edge_next(irn, edge))
46 * Get the source node of an edge.
47 * @param edge The edge.
48 * @return The source node of that edge.
50 ir_node *get_edge_src_irn(const ir_edge_t *edge);
53 * Get the position of an edge.
55 * @return The position in the in array of that edges source.
57 extern int get_edge_src_pos(const ir_edge_t *edge);
59 extern int edges_activated(const ir_graph *irg);
61 extern void edges_activate(ir_graph *irg);
63 extern void edges_deactivate(ir_graph *irg);
66 #endif /* _FIRM_EDGES_H */