+/* Initializes loops structure LOOPS, reserving place for NUM_LOOPS loops
+ (including the root of the loop tree). */
+
+static void
+init_loops_structure (struct loops *loops, unsigned num_loops)
+{
+ struct loop *root;
+
+ memset (loops, 0, sizeof *loops);
+ loops->larray = VEC_alloc (loop_p, gc, num_loops);
+
+ /* Dummy loop containing whole function. */
+ root = alloc_loop ();
+ root->num_nodes = n_basic_blocks;
+ root->latch = EXIT_BLOCK_PTR;
+ root->header = ENTRY_BLOCK_PTR;
+ ENTRY_BLOCK_PTR->loop_father = root;
+ EXIT_BLOCK_PTR->loop_father = root;
+
+ VEC_quick_push (loop_p, loops->larray, root);
+ loops->tree_root = root;
+}
+