Home | History | Annotate | Download | only in compiler

Lines Matching refs:loop

317         // Put Terminate in the loop to which it refers.
318 Node* loop = NodeProperties::GetControlInput(node);
319 BasicBlock* block = BuildBlockForNode(loop);
598 // a RPO of the graph where loop bodies are contiguous. Properties:
600 // unless B is a loop header and A is in the loop headed at B
603 // => If block A is a loop header, A appears before all blocks in the loop
606 // do not belong to the loop.)
658 LoopInfo const& loop = loops_[GetLoopNumber(block)];
659 if (loop.outgoing) return *loop.outgoing;
764 // Assign a new loop number to the header if it doesn't have one.
782 // Otherwise, compute the loop information from the backedges in order
783 // to perform a traversal that groups loop bodies together.
786 // Initialize the "loop stack". Note the entry could be a loop header.
787 LoopInfo* loop =
791 // Perform an iterative post-order traversal, visiting loop bodies before
792 // edges that lead out of loops. Visits each block once, but linking loop
793 // sections together is linear in the loop size, so overall is
794 // O(|B| + max(loop_depth) * max(|loop|))
805 // Process additional outgoing edges from the loop header.
807 // Finish the loop body the first time the header is left on the
809 DCHECK(loop != nullptr && loop->header == block);
810 loop->start = PushFront(order, block);
811 order = loop->end;
813 // Pop the loop stack and continue visiting outgoing edges within
814 // the context of the outer loop, if any.
815 loop = loop->prev;
816 // We leave the loop header on the stack; the rest of this iteration
823 DCHECK(loop != info);
836 if (loop != nullptr && !loop->members->Contains(succ->id().ToInt())) {
837 // The successor is not in the current loop or any nested loop.
838 // Add it to the outgoing edges of this loop and visit it later.
839 loop->AddOutgoing(zone_, succ);
844 // Push the inner loop onto the loop stack.
848 next->prev = loop;
849 loop = next;
855 // If we are going to pop a loop header, then add its entire body.
878 // Compute the correct loop headers and set the correct loop ends.
882 if (entry->IsLoopHeader()) --loop_depth; // Entry might be a loop header.
889 // Finish the previous loop(s) if we just exited them.
901 // Push a new loop onto the stack if this loop is a loop header.
908 TRACE("id:%d is a loop header, increment loop depth to %d\n",
915 TRACE("id:%d is not in a loop (depth == %d)\n", current->id().ToInt(),
918 TRACE("id:%d has loop header id:%d, (depth == %d)\n",
925 // Computes loop membership from the backedges of the control flow graph.
928 // Extend existing loop membership vectors.
929 for (LoopInfo& loop : loops_) {
932 new_members->CopyFrom(*loop.members);
933 loop.members = new_members;
936 // Extend loop information vector.
939 // Compute loop membership starting from backedges.
940 // O(max(loop_depth) * max(|loop|)
961 // Propagate loop membership backwards. All predecessors of M up to the
962 // loop header H are members of the loop too. O(|blocks between M and H|).
1022 LoopInfo* loop = &loops_[i];
1023 BasicBlock* header = loop->header;
1036 BasicBlock* block = loop->start;
1040 if (block == nullptr || block == loop->end) {
1041 end_found = (loop->end == block);
1054 // Check loop depth of the header.
1056 for (LoopInfo* outer = loop; outer != nullptr; outer = outer->prev) {
1382 "Schedule late of #%d:%s is id:%d at loop depth %d, minimum = id:%d\n",
1387 // into enclosing loop pre-headers until they would preceed their schedule
1516 // out of the loop which does not execute this {block}, so we
1517 // can't hoist operations from this {block} out of the loop, as
1710 // TODO(mstarzinger): The following loop gathering the propagation roots is a