- * A convenience iteration macro over all out edges of a node.
- * @param irn The node.
- * @param edge An @c ir_edge_t pointer which shall be set to the current
- * edge.
+ * Get the first successor edge of a block.
+ * A successor edge is an edge originated from another block, pointing
+ * to a mode_X node in the given block and is thus a control flow
+ * successor edge.
+ * @param irn The block.
+ * @return The first successor edge of the block.
+ */
+static INLINE const ir_edge_t *_get_block_succ_first(const ir_node *irn)
+{
+ const struct list_head *head;
+
+ assert(is_Block(irn) && "Node must be a block here");
+ head = _get_block_succ_head(irn);
+ return (ir_edge_t *) (list_empty(head) ? NULL :
+ list_entry(head->next, ir_block_edge_t, succ_list));
+}
+
+/**
+ * Get the next block successor edge.
+ * @see See _get_block_succ_first() for details.
+ * @param irn The block.
+ * @param last The last edge.
+ * @return The next edge, or NULL if there is no further.