Lines Matching defs:loop
513 "Schedule late conservative for #%d:%s is B%d at loop depth %d, "
518 // into enclosing loop pre-headers until they would preceed their
527 // Try to hoist to the pre-header of the loop header.
534 " hoist to pre-header B%d of loop header B%d, depth would be %d\n",
784 // Computes loop membership from the backedges of the control flow graph.
791 // Compute loop membership starting from backedges.
792 // O(max(loop_depth) * max(|loop|)
812 // Propagate loop membership backwards. All predecessors of M up to the
813 // loop header H are members of the loop too. O(|blocks between M and H|).
869 LoopInfo* loop = &loops[i];
870 BasicBlock* header = loop->header;
881 BlockList* l = loop->start;
885 if (l == NULL || l == loop->end) {
886 end_found = (loop->end == l);
890 DCHECK(l->block->rpo_number_ == links + loop->header->rpo_number_);
905 DCHECK(!loop->members->Contains(block->id()));
908 DCHECK(!loop->members->Contains(block->id()));
910 DCHECK(loop->members->Contains(block->id()));
922 // a RPO of the graph where loop bodies are contiguous. Properties:
924 // unless B is a loop header and A is in the loop headed at B
927 // => If block A is a loop header, A appears before all blocks in the loop
930 // do not belong to the loop.)
963 // Assign a new loop number to the header if it doesn't have one.
982 // Otherwise, compute the loop information from the backedges in order
983 // to perform a traversal that groups loop bodies together.
987 // Initialize the "loop stack". Note the entry could be a loop header.
988 LoopInfo* loop = entry->IsLoopHeader() ? &loops[entry->loop_end_] : NULL;
991 // Perform an iterative post-order traversal, visiting loop bodies before
992 // edges that lead out of loops. Visits each block once, but linking loop
993 // sections together is linear in the loop size, so overall is
994 // O(|B| + max(loop_depth) * max(|loop|))
1005 // Process additional outgoing edges from the loop header.
1007 // Finish the loop body the first time the header is left on the
1009 DCHECK(loop != NULL && loop->header == block);
1010 loop->start = order->Add(zone, block);
1011 order = loop->end;
1013 // Pop the loop stack and continue visiting outgoing edges within the
1014 // the context of the outer loop, if any.
1015 loop = loop->prev;
1016 // We leave the loop header on the stack; the rest of this iteration
1023 DCHECK(loop != info);
1036 if (loop != NULL && !loop->members->Contains(succ->id())) {
1037 // The successor is not in the current loop or any nested loop.
1038 // Add it to the outgoing edges of this loop and visit it later.
1039 loop->AddOutgoing(zone, succ);
1044 // Push the inner loop onto the loop stack.
1048 next->prev = loop;
1049 loop = next;
1055 // If we are going to pop a loop header, then add its entire body.
1079 // Compute the correct loop header for every block and set the correct loop
1095 Trace("B%d is a loop header, increment loop depth to %d\n", current->id(),
1109 Trace("B%d is not in a loop (depth == %d)\n", current->id(),
1112 Trace("B%d has loop header B%d, (depth == %d)\n", current->id(),