Lines Matching defs:loop
78 // Figure out the set of things each loop writes to, not including blocks that
91 const NaturalLoop* loop = m_graph.m_naturalLoops.innerMostLoopOf(block);
92 if (!loop)
94 LoopData& data = m_data[loop->index()];
108 // For each loop:
112 const NaturalLoop& loop = m_graph.m_naturalLoops.loop(loopIndex);
113 LoopData& data = m_data[loop.index()];
115 const NaturalLoop* outerLoop = m_graph.m_naturalLoops.innerMostOuterLoop(loop);
120 BasicBlock* header = loop.header();
138 // We try to hoist to the outer-most loop that permits it. Hoisting is valid if:
140 // - The node doesn't read anything that the loop writes.
142 // - The loop's children all belong to nodes that strictly dominate the loop header.
162 const NaturalLoop* loop = m_graph.m_naturalLoops.innerMostLoopOf(block);
163 if (!loop)
168 const NaturalLoop* current = loop;
173 // Remember: the loop stack has the inner-most loop at index 0, so if we want
174 // to bias hoisting to outer loops then we need to use a reverse loop.
203 bool attemptHoist(BasicBlock* fromBlock, Node*& nodeRef, const NaturalLoop* loop)
206 LoopData& data = m_data[loop->index()];
217 " Not hoisting ", node, " because it isn't loop invariant.\n");
226 " because it reads things that the loop writes.\n");
251 // Modify the states at the end of the preHeader of the loop we hoisted to,
252 // and all pre-headers inside the loop.
255 for (unsigned bodyIndex = loop->size(); bodyIndex--;) {
256 BasicBlock* subBlock = loop->at(bodyIndex);