+/**
+ * Allocates a new loop as son of father on the given obstack.
+ * If father is equal NULL, a new root loop is created.
+ */
+ir_loop *alloc_loop(ir_loop *father, struct obstack *obst);
+
+/** Add a son loop to a father loop. */
+void add_loop_son(ir_loop *loop, ir_loop *son);
+
+/** Add a node to a loop. */
+void add_loop_node(ir_loop *loop, ir_node *n);
+
+/** Add an IR graph to a loop. */
+void add_loop_irg(ir_loop *loop, ir_graph *irg);
+
+/** Sets the loop a node belonging to. */
+void set_irn_loop(ir_node *n, ir_loop *loop);
+
+/**
+ * Mature all loops by removing the flexible arrays of a loop tree
+ * and putting them on the given obstack.
+ */
+void mature_loops(ir_loop *loop, struct obstack *obst);
+
+/* -------- INLINE functions -------- */
+
+static INLINE int
+_is_ir_loop(const void *thing) {
+ return get_kind(thing) == k_ir_loop;
+}