+/**
+ * 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;
+}
+
+static INLINE void
+_set_irg_loop(ir_graph *irg, ir_loop *loop) {
+ assert(irg);
+ irg->loop = loop;
+}
+
+static INLINE ir_loop *
+_get_irg_loop(ir_graph *irg) {
+ assert(irg);
+ return irg->loop;
+}
+
+static INLINE ir_loop *
+_get_loop_outer_loop(const ir_loop *loop) {
+ assert(_is_ir_loop(loop));
+ return loop->outer_loop;
+}
+
+static INLINE int
+_get_loop_depth(const ir_loop *loop) {
+ assert(_is_ir_loop(loop));
+ return loop->depth;
+}
+
+static INLINE int
+_get_loop_n_sons(const ir_loop *loop) {
+ assert(_is_ir_loop(loop));
+ return loop->n_sons;
+}
+
+/* Uses temporary information to get the loop */
+static INLINE ir_loop *
+_get_irn_loop(const ir_node *n) {
+ return n->loop;
+}
+
+#define is_ir_loop(thing) _is_ir_loop(thing)
+#define set_irg_loop(irg, loop) _set_irg_loop(irg, loop)
+#define get_irg_loop(irg) _get_irg_loop(irg)
+#define get_loop_outer_loop(loop) _get_loop_outer_loop(loop)
+#define get_loop_depth(loop) _get_loop_depth(loop)
+#define get_loop_n_sons(loop) _get_loop_n_sons(loop)
+#define get_irn_loop(n) _get_irn_loop(n)
+
+#endif