+#define EDGE_SIZE(src) \
+ (edges_private_size + (is_Block(src) ? sizeof(ir_block_edge_t) : sizeof(ir_edge_t)))
+
+
+/**
+ * Get the edge object of an outgoing edge at a node.
+ * @param irg The graph, the node is in.
+ * @param src The node at which the edge originates.
+ * @param pos The position of the edge.
+ * @return The corresponding edge object or NULL,
+ * if no such edge exists.
+ */
+const ir_edge_t *get_irn_edge(ir_graph *irg, const ir_node *src, int pos)
+{
+ if(edges_activated(irg)) {
+ irg_edge_info_t *info = _get_irg_edge_info(irg);
+ size_t size = EDGE_SIZE(src);
+ ir_edge_t *templ = alloca(size);
+
+ memset(templ, 0, size);
+ templ->src = (ir_node *) src;
+ templ->pos = pos;
+ return set_find(info->edges, templ, size, edge_hash(templ));
+ }
+
+ return NULL;
+}
+