Lines Matching refs:Level
170 for (unsigned Level = 1; Level <= D->getLevels(); Level++) {
171 if (D->isSplitable(Level)) {
172 OS << "da analyze - split level = " << Level;
173 OS << ", iteration = " << *DA->getSplitIteration(*D, Level);
218 // Returns true if a particular level is scalar; that is,
220 // variable associated with the loop at this level.
222 bool Dependence::isScalar(unsigned level) const {
242 // getDirection - Returns the direction associated with a particular level.
243 unsigned FullDependence::getDirection(unsigned Level) const {
244 assert(0 < Level && Level <= Levels && "Level out of range");
245 return DV[Level - 1].Direction;
249 // Returns the distance (or NULL) associated with a particular level.
250 const SCEV *FullDependence::getDistance(unsigned Level) const {
251 assert(0 < Level && Level <= Levels && "Level out of range");
252 return DV[Level - 1].Distance;
256 // Returns true if a particular level is scalar; that is,
258 // variable associated with the loop at this level.
259 bool FullDependence::isScalar(unsigned Level) const {
260 assert(0 < Level && Level <= Levels && "Level out of range");
261 return DV[Level - 1].Scalar;
267 bool FullDependence::isPeelFirst(unsigned Level) const {
268 assert(0 < Level && Level <= Levels && "Level out of range");
269 return DV[Level - 1].PeelFirst;
275 bool FullDependence::isPeelLast(unsigned Level) const {
276 assert(0 < Level && Level <= Levels && "Level out of range");
277 return DV[Level - 1].PeelLast;
282 bool FullDependence::isSplitable(unsigned Level) const {
283 assert(0 < Level && Level <= Levels && "Level out of range");
284 return DV[Level - 1].Splitable;
666 // loop. The routine establishNestingLevels finds the level of most deeply
668 // not contained in a loop is at level = 0. MaxLevels is equal to the level
669 // of the source plus the level of the destination, minus CommonLevels.
741 // its level index in our numbering scheme.
748 // return its level index in our numbering scheme.
770 // have a level <= CommonLevels and are referred to by the SCEV Expression.
775 unsigned Level = LoopNest->getLoopDepth();
776 if (Level <= CommonLevels && !SE->isLoopInvariant(Expression, LoopNest))
777 Loops.set(Level);
1081 unsigned Level,
1092 assert(0 < Level && Level <= CommonLevels && "level out of range");
1093 Level--;
1132 Result.DV[Level].Distance = SE->getConstant(Distance);
1135 Result.DV[Level].Direction &= Dependence::DVEntry::LT;
1137 Result.DV[Level].Direction &= Dependence::DVEntry::GT;
1139 Result.DV[Level].Direction &= Dependence::DVEntry::EQ;
1144 Result.DV[Level].Distance = Delta;
1146 Result.DV[Level].Direction &= Dependence::DVEntry::EQ;
1152 Result.DV[Level].Distance = Delta; // since X/1 == X
1180 if (NewDirection < Result.DV[Level].Direction)
1182 Result.DV[Level].Direction &= NewDirection;
1220 unsigned Level,
1229 assert(0 < Level && Level <= CommonLevels && "Level out of range");
1230 Level--;
1236 Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::LT);
1237 Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::GT);
1239 if (!Result.DV[Level].Direction) {
1243 Result.DV[Level].Distance = Delta; // = 0
1250 Result.DV[Level].Splitable = true;
1296 Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::LT);
1297 Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::GT);
1299 if (!Result.DV[Level].Direction) {
1303 Result.DV[Level].Splitable = false;
1304 Result.DV[Level].Distance = SE->getZero(Delta->getType());
1330 Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::EQ);
1441 unsigned Level,
1450 assert(0 < Level && Level <= CommonLevels && "Level out of range");
1451 Level--;
1599 Result.DV[Level].Direction &= NewDirection;
1600 if (Result.DV[Level].Direction == Dependence::DVEntry::NONE)
1602 return Result.DV[Level].Direction == Dependence::DVEntry::NONE;
1652 unsigned Level,
1663 assert(0 < Level && Level <= MaxLevels && "Level out of range");
1664 Level--;
1671 if (Level < CommonLevels) {
1672 Result.DV[Level].Direction &= Dependence::DVEntry::LE;
1673 Result.DV[Level].PeelFirst = true;
1699 if (Level < CommonLevels) {
1700 Result.DV[Level].Direction &= Dependence::DVEntry::GE;
1701 Result.DV[Level].PeelLast = true;
1763 unsigned Level,
1773 assert(0 < Level && Level <= SrcLevels && "Level out of range");
1774 Level--;
1781 if (Level < CommonLevels) {
1782 Result.DV[Level].Direction &= Dependence::DVEntry::LE;
1783 Result.DV[Level].PeelFirst = true;
1809 if (Level < CommonLevels) {
1810 Result.DV[Level].Direction &= Dependence::DVEntry::GE;
1811 Result.DV[Level].PeelLast = true;
2108 unsigned &Level,
2124 Level = mapSrcLoop(CurLoop);
2128 Level, Result, NewConstraint);
2131 Level, Result, NewConstraint, SplitIter);
2134 Level, Result, NewConstraint);
2144 Level = mapSrcLoop(CurLoop);
2146 Level, Result, NewConstraint) ||
2154 Level = mapDstLoop(CurLoop);
2156 CurLoop, Level, Result, NewConstraint) ||
2381 // which is infeasible, so we can disallow the = direction for the i level.
2454 unsigned Level = mapSrcLoop(CurLoop);
2455 Result.DV[Level - 1].Direction &= unsigned(~Dependence::DVEntry::EQ);
2581 unsigned DependenceAnalysis::exploreDirections(unsigned Level,
2588 if (Level > CommonLevels) {
2617 if (Loops[Level]) {
2618 if (Level > DepthExpanded) {
2619 DepthExpanded = Level;
2620 // compute bounds for <, =, > at current level
2621 findBoundsLT(A, B, Bound, Level);
2622 findBoundsGT(A, B, Bound, Level);
2623 findBoundsEQ(A, B, Bound, Level);
2625 DEBUG(dbgs() << "\tBound for level = " << Level << '\n');
2627 if (Bound[Level].Lower[Dependence::DVEntry::LT])
2628 DEBUG(dbgs() << *Bound[Level].Lower[Dependence::DVEntry::LT] << '\t');
2631 if (Bound[Level].Upper[Dependence::DVEntry::LT])
2632 DEBUG(dbgs() << *Bound[Level].Upper[Dependence::DVEntry::LT] << '\n');
2636 if (Bound[Level].Lower[Dependence::DVEntry::EQ])
2637 DEBUG(dbgs() << *Bound[Level].Lower[Dependence::DVEntry::EQ] << '\t');
2640 if (Bound[Level].Upper[Dependence::DVEntry::EQ])
2641 DEBUG(dbgs() << *Bound[Level].Upper[Dependence::DVEntry::EQ] << '\n');
2645 if (Bound[Level].Lower[Dependence::DVEntry::GT])
2646 DEBUG(dbgs() << *Bound[Level].Lower[Dependence::DVEntry::GT] << '\t');
2649 if (Bound[Level].Upper[Dependence::DVEntry::GT])
2650 DEBUG(dbgs() << *Bound[Level].Upper[Dependence::DVEntry::GT] << '\n');
2659 if (testBounds(Dependence::DVEntry::LT, Level, Bound, Delta))
2660 NewDeps += exploreDirections(Level + 1, A, B, Bound,
2664 if (testBounds(Dependence::DVEntry::EQ, Level, Bound, Delta))
2665 NewDeps += exploreDirections(Level + 1, A, B, Bound,
2669 if (testBounds(Dependence::DVEntry::GT, Level, Bound, Delta))
2670 NewDeps += exploreDirections(Level + 1, A, B, Bound,
2673 Bound[Level].Direction = Dependence::DVEntry::ALL;
2677 return exploreDirections(Level + 1, A, B, Bound, Loops, DepthExpanded, Delta);
2683 unsigned Level,
2686 Bound[Level].Direction = DirKind;
2697 // Computes the upper and lower bounds for level K
2738 // Computes the upper and lower bounds for level K
2782 // Computes the upper and lower bounds for level K
2828 // Computes the upper and lower bounds for level K
2932 // at each level. If the lower bound for any level is -inf,
2948 // at each level. If the upper bound at any level is +inf,
3190 void DependenceAnalysis::updateDirection(Dependence::DVEntry &Level,
3199 Level.Scalar = false;
3200 Level.Distance = CurConstraint.getD();
3202 if (!SE->isKnownNonZero(Level.Distance)) // if may be zero
3204 if (!SE->isKnownNonPositive(Level.Distance)) // if may be positive
3206 if (!SE->isKnownNonNegative(Level.Distance)) // if may be negative
3208 Level.Direction &= NewDirection;
3211 Level.Scalar = false;
3212 Level.Distance = nullptr;
3216 Level.Scalar = false;
3217 Level.Distance = nullptr;
3234 Level.Direction &= NewDirection;
3243 /// for each loop level.
3587 unsigned Level;
3589 if (testSIV(Pair[SI].Src, Pair[SI].Dst, Level, Result, NewConstraint,
3638 unsigned Level;
3641 if (testSIV(Pair[SJ].Src, Pair[SJ].Dst, Level, Result, NewConstraint,
3644 ConstrainedLevels.set(Level);
3645 if (intersectConstraints(&Constraints[Level], &NewConstraint)) {
3646 if (Constraints[Level].isEmpty()) {
3933 unsigned Level;
3935 (void) testSIV(Pair[SI].Src, Pair[SI].Dst, Level,
3937 if (Level == SplitLevel) {
3972 unsigned Level;
3974 (void) testSIV(Pair[SJ].Src, Pair[SJ].Dst, Level,
3976 if (Level == SplitLevel && SplitIter)
3978 ConstrainedLevels.set(Level);
3979 if (intersectConstraints(&Constraints[Level], &NewConstraint))