Lines Matching refs:Loop
204 while (const Loop *L = SE.LI.getLoopFor(Builder.GetInsertBlock())) {
373 /// loop-aware. If some of the indices are loop-invariant while others
375 /// loop-invariant portions of the overall computation outside the loop.
380 /// pushing loop-invariant computation down into loops, so even if the
384 /// loop-invariant portions of expressions, after considering what
531 while (const Loop *L = SE.LI.getLoopFor(Builder.GetInsertBlock())) {
551 while (const Loop *L = SE.LI.getLoopFor(Builder.GetInsertBlock())) {
587 static const Loop *PickMostRelevantLoop(const Loop *A, const Loop *B,
598 /// getRelevantLoop - Get the most relevant loop associated with the given
600 const Loop *SCEVExpander::getRelevantLoop(const SCEV *S) {
601 // Test whether we've already computed the most relevant loop for this SCEV.
616 const Loop *L = nullptr;
624 const Loop *Result = getRelevantLoop(C->getOperand());
628 const Loop *Result = PickMostRelevantLoop(
643 bool operator()(std::pair<const Loop *, const SCEV *> LHS,
644 std::pair<const Loop *, const SCEV *> RHS) const {
673 // Collect all the add operands in a loop, along with their associated loops.
677 SmallVector<std::pair<const Loop *, const SCEV *>, 8> OpsAndLoops;
682 // Sort by loop. Use a stable sort so that constants follow non-constants and
690 const Loop *CurLoop = I->first;
743 // Collect all the mul operands in a loop, along with their associated loops.
745 SmallVector<std::pair<const Loop *, const SCEV *>, 8> OpsAndLoops;
750 // Sort by loop. Use a stable sort so that constants follow non-constants.
826 const Loop *L) {
831 // Addrec operands are always loop-invariant, so this can only happen
872 // Check for a simple Add/Sub or GEP of a loop invariant step.
911 /// it available to other uses in this loop. Recursively hoist any operands,
950 const Loop *L) {
963 Value *SCEVExpander::expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
971 // that would require a multiply inside the loop.
990 /// \brief Hoist the addrec instruction chain rooted in the loop phi above the
1067 /// the base addrec, which is the addrec without any non-loop-dominating
1071 const Loop *L,
1087 // step-inversion if we know this loop is outside the current loop.
1103 // expanded expression if the expanded expression's loop dominates the
1104 // loop we insert to. Check now, so we can bail out early.
1163 // loop. Remove this loop from the PostIncLoops set before expanding such
1165 // (i.e. StepV can never dominate its loop header). Ideally, we could do
1189 // Expand the step somewhere that dominates the loop header.
1217 // If IVIncInsertLoop is non-null and equal to the addrec's loop, insert the
1246 const Loop *L = S->getLoop();
1258 // Strip off any non-loop-dominating component from the addrec start.
1270 // Strip off any non-loop-dominating component from the addrec step.
1282 // Expand the core addrec. If we need post-loop scaling, force it to
1299 assert(LatchBlock && "PostInc mode requires a unique loop latch!");
1310 // happen when an IVUser outside the loop is not dominated by the latch
1323 // Expand the step somewhere that dominates the loop header.
1331 // We have decided to reuse an induction variable of a dominating loop. Apply
1351 // Re-apply any non-loop-dominating scale.
1360 // Re-apply any non-loop-dominating offset.
1380 const Loop *L = S->getLoop();
1438 // specified loop.
1471 // {0,+,1} --> Insert a canonical induction variable into the loop!
1605 // as far out in the loop nest as possible.
1607 for (Loop *L = SE.LI.getLoopFor(Builder.GetInsertBlock());;
1622 // there) so that it is guaranteed to dominate any user inside the loop.
1649 // its insertion point was already at the head of the loop.
1663 /// loop (inserting one if there is none). A canonical induction variable
1666 SCEVExpander::getOrInsertCanonicalInductionVariable(const Loop *L,
1683 /// replaceCongruentIVs - Check for congruent phis in this loop header and
1689 unsigned SCEVExpander::replaceCongruentIVs(Loop *L, const DominatorTree *DT,
1826 const Instruction *At, Loop *L) {
1832 // Look for suitable value in simple conditions at the loop exits.
1858 const SCEV *S, Loop *L, const Instruction *At,
1916 // HowManyLessThans uses a Max expression whenever the loop is not guarded by
1962 // Loop over all checks in this set.
1987 // We cannot generally expand recurrences unless the step dominates the loop
1989 // scaling the recurrence outside the loop, but this technique isn't generally
1990 // applicable. Expanding a nested recurrence outside a loop requires computing