Home | History | Annotate | Download | only in Analysis

Lines Matching refs:Bound

527         DEBUG(dbgs() << "\t\tupper bound = " << UpperBound << "\n");
920 // Loop bound may be smaller (e.g., a char).
921 // Should zero extend loop bound, since it's always >= 0.
922 // This routine collects upper bound and extends if needed.
923 // Return null if no bound available.
995 // loop's upper bound. If a dependence exists, the dependence direction is
1209 // Check Delta/(2*ConstCoeff) against upper loop bound
2405 // normalized so that the lower bound is always 0 and the stride is always 1.
2412 // U_k is the upper bound of the kth index, L_k is the lower bound of the Kth
2424 // When computing the upper bound, NULL denotes +inf;
2425 // for the lower bound, NULL denotes -inf.
2440 BoundInfo *Bound = new BoundInfo[MaxLevels + 1];
2447 Bound[K].Iterations = A[K].Iterations ? A[K].Iterations : B[K].Iterations;
2448 Bound[K].Direction = Dependence::DVEntry::ALL;
2449 Bound[K].DirSet = Dependence::DVEntry::NONE;
2450 findBoundsALL(A, B, Bound, K);
2453 if (Bound[K].Lower[Dependence::DVEntry::ALL])
2454 DEBUG(dbgs() << *Bound[K].Lower[Dependence::DVEntry::ALL] << '\t');
2457 if (Bound[K].Upper[Dependence::DVEntry::ALL])
2458 DEBUG(dbgs() << *Bound[K].Upper[Dependence::DVEntry::ALL] << '\n');
2466 if (testBounds(Dependence::DVEntry::ALL, 0, Bound, Delta)) {
2469 unsigned NewDeps = exploreDirections(1, A, B, Bound,
2476 Result.DV[K - 1].Direction = Old & Bound[K].DirSet;
2497 delete [] Bound;
2506 // in the DirSet field of Bound. Returns the number of distinct
2512 BoundInfo *Bound,
2521 Bound[K].DirSet |= Bound[K].Direction;
2523 switch (Bound[K].Direction) {
2537 llvm_unreachable("unexpected Bound[K].Direction");
2549 findBoundsLT(A, B, Bound, Level);
2550 findBoundsGT(A, B, Bound, Level);
2551 findBoundsEQ(A, B, Bound, Level);
2555 if (Bound[Level].Lower[Dependence::DVEntry::LT])
2556 DEBUG(dbgs() << *Bound[Level].Lower[Dependence::DVEntry::LT] << '\t');
2559 if (Bound[Level].Upper[Dependence::DVEntry::LT])
2560 DEBUG(dbgs() << *Bound[Level].Upper[Dependence::DVEntry::LT] << '\n');
2564 if (Bound[Level].Lower[Dependence::DVEntry::EQ])
2565 DEBUG(dbgs() << *Bound[Level].Lower[Dependence::DVEntry::EQ] << '\t');
2568 if (Bound[Level].Upper[Dependence::DVEntry::EQ])
2569 DEBUG(dbgs() << *Bound[Level].Upper[Dependence::DVEntry::EQ] << '\n');
2573 if (Bound[Level].Lower[Dependence::DVEntry::GT])
2574 DEBUG(dbgs() << *Bound[Level].Lower[Dependence::DVEntry::GT] << '\t');
2577 if (Bound[Level].Upper[Dependence::DVEntry::GT])
2578 DEBUG(dbgs() << *Bound[Level].Upper[Dependence::DVEntry::GT] << '\n');
2587 if (testBounds(Dependence::DVEntry::LT, Level, Bound, Delta))
2588 NewDeps += exploreDirections(Level + 1, A, B, Bound,
2592 if (testBounds(Dependence::DVEntry::EQ, Level, Bound, Delta))
2593 NewDeps += exploreDirections(Level + 1, A, B, Bound,
2597 if (testBounds(Dependence::DVEntry::GT, Level, Bound, Delta))
2598 NewDeps += exploreDirections(Level + 1, A, B, Bound,
2601 Bound[Level].Direction = Dependence::DVEntry::ALL;
2605 return exploreDirections(Level + 1, A, B, Bound, Loops, DepthExpanded, Delta);
2612 BoundInfo *Bound,
2614 Bound[Level].Direction = DirKind;
2615 if (const SCEV *LowerBound = getLowerBound(Bound))
2618 if (const SCEV *UpperBound = getUpperBound(Bound))
2626 // using the * direction. Records them in Bound.
2637 // We must be careful to handle the case where the upper bound is unknown.
2638 // Note that the lower bound is always <= 0
2639 // and the upper bound is always >= 0.
2642 BoundInfo *Bound,
2644 Bound[K].Lower[Dependence::DVEntry::ALL] = NULL; // Default value = -infinity.
2645 Bound[K].Upper[Dependence::DVEntry::ALL] = NULL; // Default value = +infinity.
2646 if (Bound[K].Iterations) {
2647 Bound[K].Lower[Dependence::DVEntry::ALL] =
2649 Bound[K].Iterations);
2650 Bound[K].Upper[Dependence::DVEntry::ALL] =
2652 Bound[K].Iterations);
2657 Bound[K].Lower[Dependence::DVEntry::ALL] =
2660 Bound[K].Upper[Dependence::DVEntry::ALL] =
2667 // using the = direction. Records them in Bound.
2678 // We must be careful to handle the case where the upper bound is unknown.
2679 // Note that the lower bound is always <= 0
2680 // and the upper bound is always >= 0.
2683 BoundInfo *Bound,
2685 Bound[K].Lower[Dependence::DVEntry::EQ] = NULL; // Default value = -infinity.
2686 Bound[K].Upper[Dependence::DVEntry::EQ] = NULL; // Default value = +infinity.
2687 if (Bound[K].Iterations) {
2690 Bound[K].Lower[Dependence::DVEntry::EQ] =
2691 SE->getMulExpr(NegativePart, Bound[K].Iterations);
2693 Bound[K].Upper[Dependence::DVEntry::EQ] =
2694 SE->getMulExpr(PositivePart, Bound[K].Iterations);
2702 Bound[K].Lower[Dependence::DVEntry::EQ] = NegativePart; // Zero
2705 Bound[K].Upper[Dependence::DVEntry::EQ] = PositivePart; // Zero
2711 // using the < direction. Records them in Bound.
2722 // We must be careful to handle the case where the upper bound is unknown.
2725 BoundInfo *Bound,
2727 Bound[K].Lower[Dependence::DVEntry::LT] = NULL; // Default value = -infinity.
2728 Bound[K].Upper[Dependence::DVEntry::LT] = NULL; // Default value = +infinity.
2729 if (Bound[K].Iterations) {
2731 SE->getMinusSCEV(Bound[K].Iterations,
2732 SE->getConstant(Bound[K].Iterations->getType(), 1));
2735 Bound[K].Lower[Dependence::DVEntry::LT] =
2739 Bound[K].Upper[Dependence::DVEntry::LT] =
2748 Bound[K].Lower[Dependence::DVEntry::LT] = SE->getNegativeSCEV(B[K].Coeff);
2752 Bound[K].Upper[Dependence::DVEntry::LT] = SE->getNegativeSCEV(B[K].Coeff);
2758 // using the > direction. Records them in Bound.
2769 // We must be careful to handle the case where the upper bound is unknown.
2772 BoundInfo *Bound,
2774 Bound[K].Lower[Dependence::DVEntry::GT] = NULL; // Default value = -infinity.
2775 Bound[K].Upper[Dependence::DVEntry::GT] = NULL; // Default value = +infinity.
2776 if (Bound[K].Iterations) {
2778 SE->getMinusSCEV(Bound[K].Iterations,
2779 SE->getConstant(Bound[K].Iterations->getType(), 1));
2782 Bound[K].Lower[Dependence::DVEntry::GT] =
2786 Bound[K].Upper[Dependence::DVEntry::GT] =
2794 Bound[K].Lower[Dependence::DVEntry::GT] = A[K].Coeff;
2797 Bound[K].Upper[Dependence::DVEntry::GT] = A[K].Coeff;
2847 DEBUG(dbgs() << "\tUpper Bound = ");
2861 // computes the lower bound given the current direction settings
2862 // at each level. If the lower bound for any level is -inf,
2864 const SCEV *DependenceAnalysis::getLowerBound(BoundInfo *Bound) const {
2865 const SCEV *Sum = Bound[1].Lower[Bound[1].Direction];
2867 if (Bound[K].Lower[Bound[K].Direction])
2868 Sum = SE->getAddExpr(Sum, Bound[K].Lower[Bound[K].Direction]);
2877 // computes the upper bound given the current direction settings
2878 // at each level. If the upper bound at any level is +inf,
2880 const SCEV *DependenceAnalysis::getUpperBound(BoundInfo *Bound) const {
2881 const SCEV *Sum = Bound[1].Upper[Bound[1].Direction];
2883 if (Bound[K].Upper[Bound[K].Direction])
2884 Sum = SE->getAddExpr(Sum, Bound[K].Upper[Bound[K].Direction]);