Home | History | Annotate | Download | only in Analysis

Lines Matching defs:Bound

532         DEBUG(dbgs() << "\t\tupper bound = " << UpperBound << "\n");
992 // Loop bound may be smaller (e.g., a char).
993 // Should zero extend loop bound, since it's always >= 0.
994 // This routine collects upper bound and extends or truncates if needed.
997 // Return null if no bound available.
1069 // loop's upper bound. If a dependence exists, the dependence direction is
1281 // Check Delta/(2*ConstCoeff) against upper loop bound
2477 // normalized so that the lower bound is always 0 and the stride is always 1.
2484 // U_k is the upper bound of the kth index, L_k is the lower bound of the Kth
2496 // When computing the upper bound, NULL denotes +inf;
2497 // for the lower bound, NULL denotes -inf.
2512 BoundInfo *Bound = new BoundInfo[MaxLevels + 1];
2519 Bound[K].Iterations = A[K].Iterations ? A[K].Iterations : B[K].Iterations;
2520 Bound[K].Direction = Dependence::DVEntry::ALL;
2521 Bound[K].DirSet = Dependence::DVEntry::NONE;
2522 findBoundsALL(A, B, Bound, K);
2525 if (Bound[K].Lower[Dependence::DVEntry::ALL])
2526 DEBUG(dbgs() << *Bound[K].Lower[Dependence::DVEntry::ALL] << '\t');
2529 if (Bound[K].Upper[Dependence::DVEntry::ALL])
2530 DEBUG(dbgs() << *Bound[K].Upper[Dependence::DVEntry::ALL] << '\n');
2538 if (testBounds(Dependence::DVEntry::ALL, 0, Bound, Delta)) {
2541 unsigned NewDeps = exploreDirections(1, A, B, Bound,
2548 Result.DV[K - 1].Direction = Old & Bound[K].DirSet;
2569 delete [] Bound;
2578 // in the DirSet field of Bound. Returns the number of distinct
2584 BoundInfo *Bound,
2593 Bound[K].DirSet |= Bound[K].Direction;
2595 switch (Bound[K].Direction) {
2609 llvm_unreachable("unexpected Bound[K].Direction");
2621 findBoundsLT(A, B, Bound, Level);
2622 findBoundsGT(A, B, Bound, Level);
2623 findBoundsEQ(A, B, Bound, Level);
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);
2684 BoundInfo *Bound,
2686 Bound[Level].Direction = DirKind;
2687 Bound))
2690 if (const SCEV *UpperBound = getUpperBound(Bound))
2698 // using the * direction. Records them in Bound.
2709 // We must be careful to handle the case where the upper bound is unknown.
2710 // Note that the lower bound is always <= 0
2711 // and the upper bound is always >= 0.
2714 BoundInfo *Bound,
2716 Bound[K].Lower[Dependence::DVEntry::ALL] = nullptr; // Default value = -infinity.
2717 Bound[K].Upper[Dependence::DVEntry::ALL] = nullptr; // Default value = +infinity.
2718 if (Bound[K].Iterations) {
2719 Bound[K].Lower[Dependence::DVEntry::ALL] =
2721 Bound[K].Iterations);
2722 Bound[K].Upper[Dependence::DVEntry::ALL] =
2724 Bound[K].Iterations);
2729 Bound[K].Lower[Dependence::DVEntry::ALL] =
2732 Bound[K].Upper[Dependence::DVEntry::ALL] =
2739 // using the = direction. Records them in Bound.
2750 // We must be careful to handle the case where the upper bound is unknown.
2751 // Note that the lower bound is always <= 0
2752 // and the upper bound is always >= 0.
2755 BoundInfo *Bound,
2757 Bound[K].Lower[Dependence::DVEntry::EQ] = nullptr; // Default value = -infinity.
2758 Bound[K].Upper[Dependence::DVEntry::EQ] = nullptr; // Default value = +infinity.
2759 if (Bound[K].Iterations) {
2762 Bound[K].Lower[Dependence::DVEntry::EQ] =
2763 SE->getMulExpr(NegativePart, Bound[K].Iterations);
2765 Bound[K].Upper[Dependence::DVEntry::EQ] =
2766 SE->getMulExpr(PositivePart, Bound[K].Iterations);
2774 Bound[K].Lower[Dependence::DVEntry::EQ] = NegativePart; // Zero
2777 Bound[K].Upper[Dependence::DVEntry::EQ] = PositivePart; // Zero
2783 // using the < direction. Records them in Bound.
2794 // We must be careful to handle the case where the upper bound is unknown.
2797 BoundInfo *Bound,
2799 Bound[K].Lower[Dependence::DVEntry::LT] = nullptr; // Default value = -infinity.
2800 Bound[K].Upper[Dependence::DVEntry::LT] = nullptr; // Default value = +infinity.
2801 if (Bound[K].Iterations) {
2803 Bound[K].Iterations, SE->getOne(Bound[K].Iterations->getType()));
2806 Bound[K].Lower[Dependence::DVEntry::LT] =
2810 Bound[K].Upper[Dependence::DVEntry::LT] =
2819 Bound[K].Lower[Dependence::DVEntry::LT] = SE->getNegativeSCEV(B[K].Coeff);
2823 Bound[K].Upper[Dependence::DVEntry::LT] = SE->getNegativeSCEV(B[K].Coeff);
2829 // using the > direction. Records them in Bound.
2840 // We must be careful to handle the case where the upper bound is unknown.
2843 BoundInfo *Bound,
2845 Bound[K].Lower[Dependence::DVEntry::GT] = nullptr; // Default value = -infinity.
2846 Bound[K].Upper[Dependence::DVEntry::GT] = nullptr; // Default value = +infinity.
2847 if (Bound[K].Iterations) {
2849 Bound[K].Iterations, SE->getOne(Bound[K].Iterations->getType()));
2852 Bound[K].Lower[Dependence::DVEntry::GT] =
2856 Bound[K].Upper[Dependence::DVEntry::GT] =
2864 Bound[K].Lower[Dependence::DVEntry::GT] = A[K].Coeff;
2867 Bound[K].Upper[Dependence::DVEntry::GT] = A[K].Coeff;
2917 DEBUG(dbgs() << "\tUpper Bound = ");
2931 // computes the lower bound given the current direction settings
2932 // at each level. If the lower bound for any level is -inf,
2934 const SCEV *DependenceAnalysis::getLowerBound(BoundInfo *Bound) const {
2935 const SCEV *Sum = Bound[1].Lower[Bound[1].Direction];
2937 if (Bound[K].Lower[Bound[K].Direction])
2938 Sum = SE->getAddExpr(Sum, Bound[K].Lower[Bound[K].Direction]);
2947 // computes the upper bound given the current direction settings
2948 // at each level. If the upper bound at any level is +inf,
2950 const SCEV *DependenceAnalysis::getUpperBound(BoundInfo *Bound) const {
2951 const SCEV *Sum = Bound[1].Upper[Bound[1].Direction];
2953 if (Bound[K].Upper[Bound[K].Direction])
2954 Sum = SE->getAddExpr(Sum, Bound[K].Upper[Bound[K].Direction]);