Home | History | Annotate | Download | only in Utils

Lines Matching refs:Loop

1 //===-- LCSSA.cpp - Convert loops into loop-closed SSA form ---------------===//
11 // all values that are live across the loop boundary. For example, it turns
25 // transformation is that it makes many other loop optimizations, such as
48 STATISTIC(NumLCSSA, "Number of live out of a loop variables");
59 /// Given an instruction in the loop, check to see if it has any uses that are
60 /// outside the current loop. If so, insert LCSSA PHI nodes and rewrite the
62 static bool processInstruction(Loop &L, Instruction &Inst, DominatorTree &DT,
79 // If there are no uses outside the loop, exit with no change.
117 // Add inputs from inside the loop for this PHI.
121 // If the exit block has a predecessor not within the loop, arrange for
136 // Rewrite all uses outside the loop in terms of the new PHIs we just
183 bool llvm::formLCSSA(Loop &L, DominatorTree &DT, ScalarEvolution *SE) {
195 // Look at all the instructions in the loop, checking to see if they have uses
196 // outside the loop. If so, rewrite those uses.
197 for (Loop::block_iterator BBI = L.block_begin(), BBE = L.block_end();
202 // particular, if a block does not dominate any of the loop exits, then none
203 // of the values defined in the block could be used outside the loop.
219 // If we modified the code, remove any caches about the loop from SCEV to
230 /// Process a loop nest depth first.
231 bool llvm::formLCSSARecursively(Loop &L, DominatorTree &DT,
236 for (Loop::iterator LI = L.begin(), LE = L.end(); LI != LE; ++LI)
257 /// This transformation requires natural loop information & requires that
258 /// loop preheaders be inserted into the CFG. It maintains both of these,
276 INITIALIZE_PASS_BEGIN(LCSSA, "lcssa", "Loop-Closed SSA Form Pass", false, false)
279 INITIALIZE_PASS_END(LCSSA, "lcssa", "Loop-Closed SSA Form Pass", false, false)
292 // Simplify each loop nest in the function.
299 static void verifyLoop(Loop &L, DominatorTree &DT) {
301 for (Loop::iterator LI = L.begin(), LE = L.end(); LI != LE; ++LI)
309 // Verify each loop nest in the function, assuming LI still points at that
310 // function's loop info.