Home | History | Annotate | Download | only in Analysis

Lines Matching refs:Level

176             for (unsigned Level = 1; Level <= D->getLevels(); Level++) {
177 if (D->isSplitable(Level)) {
178 OS << "da analyze - split level = " << Level;
179 OS << ", iteration = " << *DA->getSplitIteration(*D, Level);
224 // Returns true if a particular level is scalar; that is,
226 // variable associated with the loop at this level.
228 bool Dependence::isScalar(unsigned level) const {
248 // getDirection - Returns the direction associated with a particular level.
249 unsigned FullDependence::getDirection(unsigned Level) const {
250 assert(0 < Level && Level <= Levels && "Level out of range");
251 return DV[Level - 1].Direction;
255 // Returns the distance (or NULL) associated with a particular level.
256 const SCEV *FullDependence::getDistance(unsigned Level) const {
257 assert(0 < Level && Level <= Levels && "Level out of range");
258 return DV[Level - 1].Distance;
262 // Returns true if a particular level is scalar; that is,
264 // variable associated with the loop at this level.
265 bool FullDependence::isScalar(unsigned Level) const {
266 assert(0 < Level && Level <= Levels && "Level out of range");
267 return DV[Level - 1].Scalar;
273 bool FullDependence::isPeelFirst(unsigned Level) const {
274 assert(0 < Level && Level <= Levels && "Level out of range");
275 return DV[Level - 1].PeelFirst;
281 bool FullDependence::isPeelLast(unsigned Level) const {
282 assert(0 < Level && Level <= Levels && "Level out of range");
283 return DV[Level - 1].PeelLast;
288 bool FullDependence::isSplitable(unsigned Level) const {
289 assert(0 < Level && Level <= Levels && "Level out of range");
290 return DV[Level - 1].Splitable;
661 // loop. The routine establishNestingLevels finds the level of most deeply
663 // not contained in a loop is at level = 0. MaxLevels is equal to the level
664 // of the source plus the level of the destination, minus CommonLevels.
736 // its level index in our numbering scheme.
743 // return its level index in our numbering scheme.
765 // have a level <= CommonLevels and are referred to by the SCEV Expression.
770 unsigned Level = LoopNest->getLoopDepth();
771 if (Level <= CommonLevels && !SE->isLoopInvariant(Expression, LoopNest))
772 Loops.set(Level);
1068 unsigned Level, FullDependence &Result,
1078 assert(0 < Level && Level <= CommonLevels && "level out of range");
1079 Level--;
1118 Result.DV[Level].Distance = SE->getConstant(Distance);
1121 Result.DV[Level].Direction &= Dependence::DVEntry::LT;
1123 Result.DV[Level].Direction &= Dependence::DVEntry::GT;
1125 Result.DV[Level].Direction &= Dependence::DVEntry::EQ;
1130 Result.DV[Level].Distance = Delta;
1132 Result.DV[Level].Direction &= Dependence::DVEntry::EQ;
1138 Result.DV[Level].Distance = Delta; // since X/1 == X
1166 if (NewDirection < Result.DV[Level].Direction)
1168 Result.DV[Level].Direction &= NewDirection;
1204 const Loop *CurLoop, unsigned Level, FullDependence &Result,
1211 assert(0 < Level && Level <= CommonLevels && "Level out of range");
1212 Level--;
1218 Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::LT);
1219 Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::GT);
1221 if (!Result.DV[Level].Direction) {
1225 Result.DV[Level].Distance = Delta; // = 0
1232 Result.DV[Level].Splitable = true;
1278 Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::LT);
1279 Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::GT);
1281 if (!Result.DV[Level].Direction) {
1285 Result.DV[Level].Splitable = false;
1286 Result.DV[Level].Distance = SE->getZero(Delta->getType());
1312 Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::EQ);
1415 const Loop *CurLoop, unsigned Level,
1424 assert(0 < Level && Level <= CommonLevels && "Level out of range");
1425 Level--;
1573 Result.DV[Level].Direction &= NewDirection;
1574 if (Result.DV[Level].Direction == Dependence::DVEntry::NONE)
1576 return Result.DV[Level].Direction == Dependence::DVEntry::NONE;
1625 const Loop *CurLoop, unsigned Level,
1636 assert(0 < Level && Level <= MaxLevels && "Level out of range");
1637 Level--;
1644 if (Level < CommonLevels) {
1645 Result.DV[Level].Direction &= Dependence::DVEntry::LE;
1646 Result.DV[Level].PeelFirst = true;
1672 if (Level < CommonLevels) {
1673 Result.DV[Level].Direction &= Dependence::DVEntry::GE;
1674 Result.DV[Level].PeelLast = true;
1735 const Loop *CurLoop, unsigned Level,
1745 assert(0 < Level && Level <= SrcLevels && "Level out of range");
1746 Level--;
1753 if (Level < CommonLevels) {
1754 Result.DV[Level].Direction &= Dependence::DVEntry::LE;
1755 Result.DV[Level].PeelFirst = true;
1781 if (Level < CommonLevels) {
1782 Result.DV[Level].Direction &= Dependence::DVEntry::GE;
1783 Result.DV[Level].PeelLast = true;
2073 bool DependenceInfo::testSIV(const SCEV *Src, const SCEV *Dst, unsigned &Level,
2088 Level = mapSrcLoop(CurLoop);
2092 Level, Result, NewConstraint);
2095 Level, Result, NewConstraint, SplitIter);
2098 Level, Result, NewConstraint);
2108 Level = mapSrcLoop(CurLoop);
2110 Level, Result, NewConstraint) ||
2118 Level = mapDstLoop(CurLoop);
2120 CurLoop, Level, Result, NewConstraint) ||
2339 // which is infeasible, so we can disallow the = direction for the i level.
2406 unsigned Level = mapSrcLoop(CurLoop);
2407 Result.DV[Level - 1].Direction &= unsigned(~Dependence::DVEntry::EQ);
2532 unsigned DependenceInfo::exploreDirections(unsigned Level, CoefficientInfo *A,
2537 if (Level > CommonLevels) {
2566 if (Loops[Level]) {
2567 if (Level > DepthExpanded) {
2568 DepthExpanded = Level;
2569 // compute bounds for <, =, > at current level
2570 findBoundsLT(A, B, Bound, Level);
2571 findBoundsGT(A, B, Bound, Level);
2572 findBoundsEQ(A, B, Bound, Level);
2574 DEBUG(dbgs() << "\tBound for level = " << Level << '\n');
2576 if (Bound[Level].Lower[Dependence::DVEntry::LT])
2577 DEBUG(dbgs() << *Bound[Level].Lower[Dependence::DVEntry::LT] << '\t');
2580 if (Bound[Level].Upper[Dependence::DVEntry::LT])
2581 DEBUG(dbgs() << *Bound[Level].Upper[Dependence::DVEntry::LT] << '\n');
2585 if (Bound[Level].Lower[Dependence::DVEntry::EQ])
2586 DEBUG(dbgs() << *Bound[Level].Lower[Dependence::DVEntry::EQ] << '\t');
2589 if (Bound[Level].Upper[Dependence::DVEntry::EQ])
2590 DEBUG(dbgs() << *Bound[Level].Upper[Dependence::DVEntry::EQ] << '\n');
2594 if (Bound[Level].Lower[Dependence::DVEntry::GT])
2595 DEBUG(dbgs() << *Bound[Level].Lower[Dependence::DVEntry::GT] << '\t');
2598 if (Bound[Level].Upper[Dependence::DVEntry::GT])
2599 DEBUG(dbgs() << *Bound[Level].Upper[Dependence::DVEntry::GT] << '\n');
2608 if (testBounds(Dependence::DVEntry::LT, Level, Bound, Delta))
2609 NewDeps += exploreDirections(Level + 1, A, B, Bound,
2613 if (testBounds(Dependence::DVEntry::EQ, Level, Bound, Delta))
2614 NewDeps += exploreDirections(Level + 1, A, B, Bound,
2618 if (testBounds(Dependence::DVEntry::GT, Level, Bound, Delta))
2619 NewDeps += exploreDirections(Level + 1, A, B, Bound,
2622 Bound[Level].Direction = Dependence::DVEntry::ALL;
2626 return exploreDirections(Level + 1, A, B, Bound, Loops, DepthExpanded, Delta);
2631 bool DependenceInfo::testBounds(unsigned char DirKind, unsigned Level,
2633 Bound[Level].Direction = DirKind;
2644 // Computes the upper and lower bounds for level K
2683 // Computes the upper and lower bounds for level K
2725 // Computes the upper and lower bounds for level K
2769 // Computes the upper and lower bounds for level K
2870 // at each level. If the lower bound for any level is -inf,
2886 // at each level. If the upper bound at any level is +inf,
3124 void DependenceInfo::updateDirection(Dependence::DVEntry &Level,
3132 Level.Scalar = false;
3133 Level.Distance = CurConstraint.getD();
3135 if (!SE->isKnownNonZero(Level.Distance)) // if may be zero
3137 if (!SE->isKnownNonPositive(Level.Distance)) // if may be positive
3139 if (!SE->isKnownNonNegative(Level.Distance)) // if may be negative
3141 Level.Direction &= NewDirection;
3144 Level.Scalar = false;
3145 Level.Distance = nullptr;
3149 Level.Scalar = false;
3150 Level.Distance = nullptr;
3167 Level.Direction &= NewDirection;
3176 /// for each loop level.
3518 unsigned Level;
3520 if (testSIV(Pair[SI].Src, Pair[SI].Dst, Level, Result, NewConstraint,
3569 unsigned Level;
3572 if (testSIV(Pair[SJ].Src, Pair[SJ].Dst, Level, Result, NewConstraint,
3575 ConstrainedLevels.set(Level);
3576 if (intersectConstraints(&Constraints[Level], &NewConstraint)) {
3577 if (Constraints[Level].isEmpty()) {
3864 unsigned Level;
3866 (void) testSIV(Pair[SI].Src, Pair[SI].Dst, Level,
3868 if (Level == SplitLevel) {
3903 unsigned Level;
3905 (void) testSIV(Pair[SJ].Src, Pair[SJ].Dst, Level,
3907 if (Level == SplitLevel && SplitIter)
3909 ConstrainedLevels.set(Level);
3910 if (intersectConstraints(&Constraints[Level], &NewConstraint))