benode: Remove be_find_return_reg_input().
[libfirm] / include / libfirm / iredges.h
index b65ec30..c4b6ba8 100644 (file)
@@ -52,7 +52,6 @@ FIRM_API const ir_edge_t *get_irn_out_edge_first_kind(const ir_node *irn,
  * @note There is no order on out edges. First in this context only
  * means, that you get some starting point into the list of edges.
  * @param irn The node.
- * @param kind The kind of the edge.
  * @return The first out edge that points to this node.
  */
 FIRM_API const ir_edge_t *get_irn_out_edge_first(const ir_node *irn);
@@ -70,10 +69,12 @@ FIRM_API const ir_edge_t *get_block_succ_first(const ir_node *block);
  * Returns the next edge in the out list of some node.
  * @param irn The node.
  * @param last The last out edge you have seen.
+ * @param kind the kind of edge that are iterated
  * @return The next out edge in @p irn 's out list after @p last.
  */
 FIRM_API const ir_edge_t *get_irn_out_edge_next(const ir_node *irn,
-                                                const ir_edge_t *last);
+                                                const ir_edge_t *last,
+                                                ir_edge_kind_t kind);
 
 /**
  * A convenience iteration macro over all out edges of a node.
@@ -83,7 +84,7 @@ FIRM_API const ir_edge_t *get_irn_out_edge_next(const ir_node *irn,
  * edge.
  */
 #define foreach_out_edge_kind(irn, edge, kind) \
-       for (ir_edge_t const *edge = get_irn_out_edge_first_kind(irn, kind); edge; edge = get_irn_out_edge_next(irn, edge))
+       for (ir_edge_t const *edge = get_irn_out_edge_first_kind(irn, kind); edge; edge = get_irn_out_edge_next(irn, edge, kind))
 
 /**
  * A convenience iteration macro over all out edges of a node, which is safe
@@ -94,9 +95,8 @@ FIRM_API const ir_edge_t *get_irn_out_edge_next(const ir_node *irn,
  * @param kind The kind of the edge.
  */
 #define foreach_out_edge_kind_safe(irn, edge, kind) \
-       for (ir_edge_t const *edge = get_irn_out_edge_first_kind((irn), (kind)), *edge##__next; \
-            edge ? edge##__next = get_irn_out_edge_next((irn), edge), 1 : (edge##__next = NULL, 0); \
-            edge = edge##__next)
+       for (ir_edge_t const *edge = get_irn_out_edge_first_kind((irn), (kind)), *edge##__next; edge; edge = edge##__next) \
+               if (edge##__next = get_irn_out_edge_next((irn), edge, (kind)), 0) {} else
 
 /**
  * Convenience macro for normal out edges.
@@ -137,7 +137,6 @@ FIRM_API int get_irn_n_edges_kind(const ir_node *irn, ir_edge_kind_t kind);
 /**
  * Returns the number of registered out edges with EDGE_KIND_NORMAL
  * @param irn The node.
- * @param kind The kind.
  */
 FIRM_API int get_irn_n_edges(const ir_node *irn);