Lines Matching refs:loops
1 /* Code to analyze doloop loops in order for targets to perform late
2 optimizations converting doloops to other forms of hardware loops.
36 /* Dump information collected in LOOPS. */
38 dump_hwloops (hwloop_info loops)
42 for (loop = loops; loop; loop = loop->next)
60 fprintf (dump_file, " inner loops: [ ");
61 for (ix = 0; loop->loops.iterate (ix, &i); ix++)
188 well. This transformation gives a second chance to loops we couldn't
339 /* Analyze the structure of the loops in the current function. Use
341 hardware loops found in this function. HOOKS is the argument
347 hwloop_info loops = NULL;
398 loop->next = loops;
399 loops = loop;
414 /* Compute loop nestings. Given two loops A and B, either the sets
417 for (loop = loops; loop; loop = loop->next)
424 for (other = loops; other; other = other->next)
433 loop->loops.safe_push (other);
436 other->loops.safe_push (loop);
441 ";; can't find suitable nesting for loops %d and %d\n",
449 dump_hwloops (loops);
451 return loops;
454 /* Free up the loop structures in LOOPS. */
456 free_loops (hwloop_info loops)
458 while (loops)
460 hwloop_info loop = loops;
461 loops = loop->next;
462 loop->loops.release ();
488 does not introduce new branches into loops; it may remove them, or
491 reorder_loops (hwloop_info loops)
500 for (loop = loops; loop; loop = loop->next)
533 loops = loops->next;
548 /* Call the OPT function for LOOP and all of its sub-loops. This is
549 done in a depth-first search; innermost loops are visited first.
571 /* Every loop contains in its list of inner loops every loop nested inside
572 it, even if there are intermediate loops. This works because we're doing
576 for (ix = 0; loop->loops.iterate (ix, &inner); ix++)
601 find and analyze loops that end in loop_end instructions. It uses
620 hwloop_info loops = NULL;
631 fprintf (dump_file, ";; Find loops, first pass\n\n");
633 loops = discover_loops (&loop_stack, hooks);
639 reorder_loops (loops);
640 free_loops (loops);
643 fprintf (dump_file, ";; Find loops, second pass\n\n");
645 loops = discover_loops (&loop_stack, hooks);
648 for (loop = loops; loop; loop = loop->next)
652 for (loop = loops; loop; loop = loop->next)
657 fprintf (dump_file, ";; After hardware loops optimization:\n\n");
658 dump_hwloops (loops);
661 free_loops (loops);