Home | History | Annotate | Download | only in Scalar

Lines Matching refs:Loop

15 // have as one or more of their components the loop induction variable, it
18 // related to loop induction variables.
34 // case of post-increment users is users outside the loop.
56 #define DEBUG_TYPE "loop-reduce"
256 void InitialMatch(const SCEV *S, Loop *L, ScalarEvolution &SE);
274 static void DoInitialMatch(const SCEV *S, Loop *L,
278 // Collect expressions which properly dominate the loop header.
329 /// InitialMatch - Incorporate loop-variant parts of S into this Formula,
330 /// attempting to keep all loop-invariant and loop-computable values in a
332 void Formula::InitialMatch(const SCEV *S, Loop *L, ScalarEvolution &SE) {
663 /// isExistingPhi - Return true if this AddRec is already a phi in its loop.
828 const Loop *L,
840 const Loop *L,
844 const Loop *L,
854 const Loop *L,
857 // If this is an addrec for another loop, don't second-guess its addrec phi
859 // loop at a time. LSR has already run on inner loops, will not run on outer
902 const Loop *L,
920 const Loop *L,
947 // Determine how many (unfolded) adds we'll need inside the loop.
1037 /// induction variable, this variable is non-null and holds the loop
1047 /// offsets, for example in an unrolled loop.
1050 bool isUseFullyOutsideLoop(const Loop *L) const;
1064 /// value outside of the given loop.
1065 bool LSRFixup::isUseFullyOutsideLoop(const Loop *L) const {
1169 /// LSRUse are outside of the loop, in which case some special-case heuristics
1293 OS << ", all-fixups-outside-loop";
1584 /// LSRInstance - This class holds state for the main loop strength reduction
1592 Loop *const L;
1595 /// IVIncInsertPos - This is the insert position that the current loop's
1598 /// position which will dominate all the in-loop post-increment users.
1617 // have more than a few IV increment chains in a loop. Missing a Chain falls
1727 LSRInstance(Loop *L, Pass *P);
1741 /// inside the loop then try to eliminate the cast operation.
1864 /// OptimizeMax - Rewrite the loop's terminating condition if it uses
1877 /// a C do-while loop. For example, seemingly well-behaved top-test loops
1891 /// max expression, which allows it to give the loop a canonical
1900 /// Canonical induction variables are necessary because the loop passes
1905 /// the loop has a canonical induction variable.
1908 /// can be quite costly, especially if it's inside of an outer loop.
1910 /// This function solves this problem by detecting this type of loop and
1915 // Check that the loop matches the pattern we're looking for.
1975 "Loop condition operand is an addrec in a different loop!");
2023 /// OptimizeLoopTermCond - Change loop terminating condition to use the
2036 // Get the terminating condition for the loop if possible. If we
2055 // being unable to find a sufficient guard, for example), change the loop
2114 DEBUG(dbgs() << " Change loop exiting icmp to use postinc iv: "
2117 // It's possible for the setcc instruction to be anywhere in the loop, and
2146 // Determine an insertion point for the loop induction variable increment. It
2148 // dominate the loop latch edge.
2174 // the uses will have all its uses outside the loop, for example.
2365 /// by an AddRec in this loop) within [OI,OE) or returns OE. If IVUsers mapped
2369 Loop *L, ScalarEvolution &SE) {
2444 /// Return true if the chain increment is profitable to expand into a loop
2564 // profitable loop invariant increment from the last link in the Chain.
2585 // The increment must be loop-invariant so it can be kept in a register.
2608 // into this loop's AddRec.
2674 /// the loop. Subsequent passes can easily "unchain" computation exposing more
2675 /// ILP *within the loop* if the target wants it.
2686 /// TODO: Walk the entire domtree within this loop, not just the path to the
2687 /// loop latch. This will discover chains on side paths, but requires
2701 // Walk the instruction stream from the loop header to the loop latch.
2985 /// the given use, separating out loop-variant portions from loop-invariant
2986 /// and loop-computable portions.
3028 /// loop-invariant values which we're tracking. These other uses will pin these
3031 /// TODO: Should this give more weight to users inside the loop?
3051 // Look for instructions defined outside the loop.
3066 // Ignore instructions not dominated by the loop.
3121 const Loop *L,
3145 // does not pertain to this loop.
3197 // Loop-variant "unknown" values are uninteresting; we won't be able to
3257 /// loop-dominating registers added into a single register.
3448 // As a special-case, handle special out-of-loop Basic users specially.
4039 // With all other options exhausted, loop until the system is simple
4237 const Loop *IPLoop = LI.getLoopFor(IP->getParent());
4247 // Don't climb into a loop though.
4248 const Loop *IDomLoop = LI.getLoopFor(IDom);
4309 const Loop *PIL = *I;
4312 // Be dominated by the loop exit.
4537 // is the canonical backedge for this loop, which complicates post-inc
4542 Loop *PNLoop = LI.getLoopFor(Parent);
4559 // If PN is outside of the loop and BB is in the loop, we want to
4679 LSRInstance::LSRInstance(Loop *L, Pass *P)
4696 DEBUG(dbgs() << "LSR skipping loop, too many IV Users in " << *L
4706 // IVUsers analysis should only create users that are dominated by simple loop
4707 // headers. Since this loop should dominate all of its users, its user list
4708 // should be empty if this loop itself is not within a simple loop nest.
4712 const Loop *DomLoop = LI.getLoopFor(BB);
4714 assert(DomLoop->getLoopPreheader() && "LSR needs a simplified loop nest");
4719 DEBUG(dbgs() << "\nLSR on loop ";
4723 // First, perform some low-level loop optimizations.
4727 // If loop preparation eliminates all interesting IV users, bail.
4732 DEBUG(dbgs() << "LSR skipping outer loop " << *L << "\n");
4850 bool runOnLoop(Loop *L, LPPassManager &LPM);
4857 INITIALIZE_PASS_BEGIN(LoopStrengthReduce, "loop-reduce",
4858 "Loop Strength Reduction", false, false)
4865 INITIALIZE_PASS_END(LoopStrengthReduce, "loop-reduce",
4866 "Loop Strength Reduction", false, false)
4897 bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager & /*LPM*/) {