Lines Matching refs:SE
130 auto &SE = FAM.getResult<ScalarEvolutionAnalysis>(F); in run() local
132 return DependenceInfo(&F, &AA, &SE, &LI); in run()
158 auto &SE = getAnalysis<ScalarEvolutionWrapperPass>().getSE(); in runOnFunction() local
160 info.reset(new DependenceInfo(&F, &AA, &SE, &LI)); in runOnFunction()
366 return SE->getNegativeSCEV(C); in getD()
397 A = SE->getOne(D->getType()); in setDistance()
398 B = SE->getNegativeSCEV(A); in setDistance()
399 C = SE->getNegativeSCEV(D); in setDistance()
406 SE = NewSE; in setAny()
486 const SCEV *Prod1 = SE->getMulExpr(X->getA(), Y->getB()); in intersectConstraints()
487 const SCEV *Prod2 = SE->getMulExpr(X->getB(), Y->getA()); in intersectConstraints()
491 Prod1 = SE->getMulExpr(X->getC(), Y->getB()); in intersectConstraints()
492 Prod2 = SE->getMulExpr(X->getB(), Y->getC()); in intersectConstraints()
505 const SCEV *C1B2 = SE->getMulExpr(X->getC(), Y->getB()); in intersectConstraints()
506 const SCEV *C1A2 = SE->getMulExpr(X->getC(), Y->getA()); in intersectConstraints()
507 const SCEV *C2B1 = SE->getMulExpr(Y->getC(), X->getB()); in intersectConstraints()
508 const SCEV *C2A1 = SE->getMulExpr(Y->getC(), X->getA()); in intersectConstraints()
509 const SCEV *A1B2 = SE->getMulExpr(X->getA(), Y->getB()); in intersectConstraints()
510 const SCEV *A2B1 = SE->getMulExpr(Y->getA(), X->getB()); in intersectConstraints()
512 dyn_cast<SCEVConstant>(SE->getMinusSCEV(C1A2, C2A1)); in intersectConstraints()
514 dyn_cast<SCEVConstant>(SE->getMinusSCEV(C1B2, C2B1)); in intersectConstraints()
516 dyn_cast<SCEVConstant>(SE->getMinusSCEV(A1B2, A2B1)); in intersectConstraints()
518 dyn_cast<SCEVConstant>(SE->getMinusSCEV(A2B1, A1B2)); in intersectConstraints()
557 X->setPoint(SE->getConstant(Xq), in intersectConstraints()
558 SE->getConstant(Yq), in intersectConstraints()
571 const SCEV *A1X1 = SE->getMulExpr(Y->getA(), X->getX()); in intersectConstraints()
572 const SCEV *B1Y1 = SE->getMulExpr(Y->getB(), X->getY()); in intersectConstraints()
573 const SCEV *Sum = SE->getAddExpr(A1X1, B1Y1); in intersectConstraints()
806 return SE->isLoopInvariant(Expression, LoopNest->getOutermostLoop()); in isLoopInvariant()
818 if (Level <= CommonLevels && !SE->isLoopInvariant(Expression, LoopNest)) in collectCommonLoops()
869 Pair->Src = SE->getSignExtendExpr(Src, widestType); in unifySubscriptType()
872 Pair->Dst = SE->getSignExtendExpr(Dst, widestType); in unifySubscriptType()
917 const SCEV *Step = AddRec->getStepRecurrence(*SE); in checkSubscript()
918 const SCEV *UB = SE->getBackedgeTakenCount(AddRec->getLoop()); in checkSubscript()
920 if (SE->getTypeSizeInBits(Start->getType()) < in checkSubscript()
921 SE->getTypeSizeInBits(UB->getType())) { in checkSubscript()
1006 if (SE->isKnownPredicate(Pred, X, Y)) in isKnownPredicate()
1013 const SCEV *Delta = SE->getMinusSCEV(X, Y); in isKnownPredicate()
1018 return SE->isKnownNonZero(Delta); in isKnownPredicate()
1020 return SE->isKnownNonNegative(Delta); in isKnownPredicate()
1022 return SE->isKnownNonPositive(Delta); in isKnownPredicate()
1024 return SE->isKnownPositive(Delta); in isKnownPredicate()
1026 return SE->isKnownNegative(Delta); in isKnownPredicate()
1043 S = SE->getTruncateOrZeroExtend(S, MaxType); in isKnownLessThan()
1044 Size = SE->getTruncateOrZeroExtend(Size, MaxType); in isKnownLessThan()
1047 const SCEV *Bound = SE->getMinusSCEV(S, Size); in isKnownLessThan()
1050 const SCEV *BECount = SE->getBackedgeTakenCount(AddRec->getLoop()); in isKnownLessThan()
1052 const SCEV *Limit = AddRec->evaluateAtIteration(BECount, *SE); in isKnownLessThan()
1053 if (SE->isKnownNegative(Limit)) in isKnownLessThan()
1061 SE->getMinusSCEV(S, SE->getSMaxExpr(Size, SE->getOne(Size->getType()))); in isKnownLessThan()
1062 return SE->isKnownNegative(LimitedBound); in isKnownLessThan()
1074 if (SE->isKnownNonNegative(AddRec->getStart()) && in isKnownNonNegative()
1075 SE->isKnownNonNegative(AddRec->getOperand(1))) in isKnownNonNegative()
1081 return SE->isKnownNonNegative(S); in isKnownNonNegative()
1092 if (SE->hasLoopInvariantBackedgeTakenCount(L)) { in collectUpperBound()
1093 const SCEV *UB = SE->getBackedgeTakenCount(L); in collectUpperBound()
1094 return SE->getTruncateOrZeroExtend(UB, T); in collectUpperBound()
1182 const SCEV *Delta = SE->getMinusSCEV(SrcConst, DstConst); in strongSIVtest()
1191 SE->isKnownNonNegative(Delta) ? Delta : SE->getNegativeSCEV(Delta); in strongSIVtest()
1193 SE->isKnownNonNegative(Coeff) ? Coeff : SE->getNegativeSCEV(Coeff); in strongSIVtest()
1194 const SCEV *Product = SE->getMulExpr(UpperBound, AbsCoeff); in strongSIVtest()
1219 Result.DV[Level].Distance = SE->getConstant(Distance); in strongSIVtest()
1220 NewConstraint.setDistance(SE->getConstant(Distance), CurLoop); in strongSIVtest()
1245 SE->getNegativeSCEV(Coeff), in strongSIVtest()
1246 SE->getNegativeSCEV(Delta), CurLoop); in strongSIVtest()
1250 bool DeltaMaybeZero = !SE->isKnownNonZero(Delta); in strongSIVtest()
1251 bool DeltaMaybePositive = !SE->isKnownNonPositive(Delta); in strongSIVtest()
1252 bool DeltaMaybeNegative = !SE->isKnownNonNegative(Delta); in strongSIVtest()
1253 bool CoeffMaybePositive = !SE->isKnownNonPositive(Coeff); in strongSIVtest()
1254 bool CoeffMaybeNegative = !SE->isKnownNonNegative(Coeff); in strongSIVtest()
1315 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst); in weakCrossingSIVtest()
1334 if (SE->isKnownNegative(ConstCoeff)) { in weakCrossingSIVtest()
1335 ConstCoeff = dyn_cast<SCEVConstant>(SE->getNegativeSCEV(ConstCoeff)); in weakCrossingSIVtest()
1338 Delta = SE->getNegativeSCEV(Delta); in weakCrossingSIVtest()
1340 assert(SE->isKnownPositive(ConstCoeff) && "ConstCoeff should be positive"); in weakCrossingSIVtest()
1343 SplitIter = SE->getUDivExpr( in weakCrossingSIVtest()
1344 SE->getSMaxExpr(SE->getZero(Delta->getType()), Delta), in weakCrossingSIVtest()
1345 SE->getMulExpr(SE->getConstant(Delta->getType(), 2), ConstCoeff)); in weakCrossingSIVtest()
1356 if (SE->isKnownNegative(Delta)) { in weakCrossingSIVtest()
1367 const SCEV *ConstantTwo = SE->getConstant(UpperBound->getType(), 2); in weakCrossingSIVtest()
1368 const SCEV *ML = SE->getMulExpr(SE->getMulExpr(ConstCoeff, UpperBound), in weakCrossingSIVtest()
1387 Result.DV[Level].Distance = SE->getZero(Delta->getType()); in weakCrossingSIVtest()
1517 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst); in exactSIVtest()
1519 NewConstraint.setLine(SrcCoeff, SE->getNegativeSCEV(DstCoeff), Delta, in exactSIVtest()
1713 const SCEV *Delta = SE->getMinusSCEV(SrcConst, DstConst); in weakZeroSrcSIVtest()
1714 NewConstraint.setLine(SE->getZero(Delta->getType()), DstCoeff, Delta, in weakZeroSrcSIVtest()
1729 SE->isKnownNegative(ConstCoeff) ? in weakZeroSrcSIVtest()
1730 SE->getNegativeSCEV(ConstCoeff) : ConstCoeff; in weakZeroSrcSIVtest()
1732 SE->isKnownNegative(ConstCoeff) ? SE->getNegativeSCEV(Delta) : Delta; in weakZeroSrcSIVtest()
1738 const SCEV *Product = SE->getMulExpr(AbsCoeff, UpperBound); in weakZeroSrcSIVtest()
1757 if (SE->isKnownNegative(NewDelta)) { in weakZeroSrcSIVtest()
1822 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst); in weakZeroDstSIVtest()
1823 NewConstraint.setLine(SrcCoeff, SE->getZero(Delta->getType()), Delta, in weakZeroDstSIVtest()
1838 SE->isKnownNegative(ConstCoeff) ? in weakZeroDstSIVtest()
1839 SE->getNegativeSCEV(ConstCoeff) : ConstCoeff; in weakZeroDstSIVtest()
1841 SE->isKnownNegative(ConstCoeff) ? SE->getNegativeSCEV(Delta) : Delta; in weakZeroDstSIVtest()
1847 const SCEV *Product = SE->getMulExpr(AbsCoeff, UpperBound); in weakZeroDstSIVtest()
1866 if (SE->isKnownNegative(NewDelta)) { in weakZeroDstSIVtest()
1902 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst); in exactRDIVtest()
2063 const SCEV *C2_C1 = SE->getMinusSCEV(C2, C1); in symbolicRDIVtest()
2064 const SCEV *C1_C2 = SE->getMinusSCEV(C1, C2); in symbolicRDIVtest()
2067 if (SE->isKnownNonNegative(A1)) { in symbolicRDIVtest()
2068 if (SE->isKnownNonNegative(A2)) { in symbolicRDIVtest()
2072 const SCEV *A1N1 = SE->getMulExpr(A1, N1); in symbolicRDIVtest()
2081 const SCEV *A2N2 = SE->getMulExpr(A2, N2); in symbolicRDIVtest()
2089 else if (SE->isKnownNonPositive(A2)) { in symbolicRDIVtest()
2093 const SCEV *A1N1 = SE->getMulExpr(A1, N1); in symbolicRDIVtest()
2094 const SCEV *A2N2 = SE->getMulExpr(A2, N2); in symbolicRDIVtest()
2095 const SCEV *A1N1_A2N2 = SE->getMinusSCEV(A1N1, A2N2); in symbolicRDIVtest()
2103 if (SE->isKnownNegative(C2_C1)) { in symbolicRDIVtest()
2109 else if (SE->isKnownNonPositive(A1)) { in symbolicRDIVtest()
2110 if (SE->isKnownNonNegative(A2)) { in symbolicRDIVtest()
2114 const SCEV *A1N1 = SE->getMulExpr(A1, N1); in symbolicRDIVtest()
2115 const SCEV *A2N2 = SE->getMulExpr(A2, N2); in symbolicRDIVtest()
2116 const SCEV *A1N1_A2N2 = SE->getMinusSCEV(A1N1, A2N2); in symbolicRDIVtest()
2124 if (SE->isKnownPositive(C2_C1)) { in symbolicRDIVtest()
2129 else if (SE->isKnownNonPositive(A2)) { in symbolicRDIVtest()
2133 const SCEV *A1N1 = SE->getMulExpr(A1, N1); in symbolicRDIVtest()
2142 const SCEV *A2N2 = SE->getMulExpr(A2, N2); in symbolicRDIVtest()
2173 const SCEV *SrcCoeff = SrcAddRec->getStepRecurrence(*SE); in testSIV()
2174 const SCEV *DstCoeff = DstAddRec->getStepRecurrence(*SE); in testSIV()
2183 else if (SrcCoeff == SE->getNegativeSCEV(DstCoeff)) in testSIV()
2195 const SCEV *SrcCoeff = SrcAddRec->getStepRecurrence(*SE); in testSIV()
2205 const SCEV *DstCoeff = DstAddRec->getStepRecurrence(*SE); in testSIV()
2249 SrcCoeff = SrcAddRec->getStepRecurrence(*SE); in testRDIV()
2252 DstCoeff = DstAddRec->getStepRecurrence(*SE); in testRDIV()
2259 SrcCoeff = tmpAddRec->getStepRecurrence(*SE); in testRDIV()
2262 DstCoeff = SE->getNegativeSCEV(SrcAddRec->getStepRecurrence(*SE)); in testRDIV()
2272 DstCoeff = tmpAddRec->getStepRecurrence(*SE); in testRDIV()
2275 SrcCoeff = SE->getNegativeSCEV(DstAddRec->getStepRecurrence(*SE)); in testRDIV()
2343 unsigned BitWidth = SE->getTypeSizeInBits(Src->getType()); in gcdMIVtest()
2353 const SCEV *Coeff = AddRec->getStepRecurrence(*SE); in gcdMIVtest()
2372 const SCEV *Coeff = AddRec->getStepRecurrence(*SE); in gcdMIVtest()
2385 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst); in gcdMIVtest()
2445 const SCEV *SrcCoeff = AddRec->getStepRecurrence(*SE); in gcdMIVtest()
2446 const SCEV *DstCoeff = SE->getMinusSCEV(SrcCoeff, SrcCoeff); in gcdMIVtest()
2450 const SCEV *Coeff = AddRec->getStepRecurrence(*SE); in gcdMIVtest()
2467 const SCEV *Coeff = AddRec->getStepRecurrence(*SE); in gcdMIVtest()
2481 Delta = SE->getMinusSCEV(SrcCoeff, DstCoeff); in gcdMIVtest()
2554 const SCEV *Delta = SE->getMinusSCEV(B0, A0); in banerjeeMIVtest()
2774 SE->getMulExpr(SE->getMinusSCEV(A[K].NegPart, B[K].PosPart), in findBoundsALL()
2777 SE->getMulExpr(SE->getMinusSCEV(A[K].PosPart, B[K].NegPart), in findBoundsALL()
2784 SE->getZero(A[K].Coeff->getType()); in findBoundsALL()
2787 SE->getZero(A[K].Coeff->getType()); in findBoundsALL()
2812 const SCEV *Delta = SE->getMinusSCEV(A[K].Coeff, B[K].Coeff); in findBoundsEQ()
2815 SE->getMulExpr(NegativePart, Bound[K].Iterations); in findBoundsEQ()
2818 SE->getMulExpr(PositivePart, Bound[K].Iterations); in findBoundsEQ()
2823 const SCEV *Delta = SE->getMinusSCEV(A[K].Coeff, B[K].Coeff); in findBoundsEQ()
2852 const SCEV *Iter_1 = SE->getMinusSCEV( in findBoundsLT()
2853 Bound[K].Iterations, SE->getOne(Bound[K].Iterations->getType())); in findBoundsLT()
2855 getNegativePart(SE->getMinusSCEV(A[K].NegPart, B[K].Coeff)); in findBoundsLT()
2857 SE->getMinusSCEV(SE->getMulExpr(NegPart, Iter_1), B[K].Coeff); in findBoundsLT()
2859 getPositivePart(SE->getMinusSCEV(A[K].PosPart, B[K].Coeff)); in findBoundsLT()
2861 SE->getMinusSCEV(SE->getMulExpr(PosPart, Iter_1), B[K].Coeff); in findBoundsLT()
2867 getNegativePart(SE->getMinusSCEV(A[K].NegPart, B[K].Coeff)); in findBoundsLT()
2869 Bound[K].Lower[Dependence::DVEntry::LT] = SE->getNegativeSCEV(B[K].Coeff); in findBoundsLT()
2871 getPositivePart(SE->getMinusSCEV(A[K].PosPart, B[K].Coeff)); in findBoundsLT()
2873 Bound[K].Upper[Dependence::DVEntry::LT] = SE->getNegativeSCEV(B[K].Coeff); in findBoundsLT()
2896 const SCEV *Iter_1 = SE->getMinusSCEV( in findBoundsGT()
2897 Bound[K].Iterations, SE->getOne(Bound[K].Iterations->getType())); in findBoundsGT()
2899 getNegativePart(SE->getMinusSCEV(A[K].Coeff, B[K].PosPart)); in findBoundsGT()
2901 SE->getAddExpr(SE->getMulExpr(NegPart, Iter_1), A[K].Coeff); in findBoundsGT()
2903 getPositivePart(SE->getMinusSCEV(A[K].Coeff, B[K].NegPart)); in findBoundsGT()
2905 SE->getAddExpr(SE->getMulExpr(PosPart, Iter_1), A[K].Coeff); in findBoundsGT()
2910 const SCEV *NegPart = getNegativePart(SE->getMinusSCEV(A[K].Coeff, B[K].PosPart)); in findBoundsGT()
2913 const SCEV *PosPart = getPositivePart(SE->getMinusSCEV(A[K].Coeff, B[K].NegPart)); in findBoundsGT()
2922 return SE->getSMaxExpr(X, SE->getZero(X->getType())); in getPositivePart()
2928 return SE->getSMinExpr(X, SE->getZero(X->getType())); in getNegativePart()
2938 const SCEV *Zero = SE->getZero(Subscript->getType()); in collectCoeffInfo()
2949 CI[K].Coeff = AddRec->getStepRecurrence(*SE); in collectCoeffInfo()
2985 Sum = SE->getAddExpr(Sum, Bound[K].Lower[Bound[K].Direction]); in getLowerBound()
3001 Sum = SE->getAddExpr(Sum, Bound[K].Upper[Bound[K].Direction]); in getUpperBound()
3022 return SE->getZero(Expr->getType()); in findCoefficient()
3024 return AddRec->getStepRecurrence(*SE); in findCoefficient()
3041 return SE->getAddRecExpr(zeroCoefficient(AddRec->getStart(), TargetLoop), in zeroCoefficient()
3042 AddRec->getStepRecurrence(*SE), in zeroCoefficient()
3058 return SE->getAddRecExpr(Expr, in addToCoefficient()
3063 const SCEV *Sum = SE->getAddExpr(AddRec->getStepRecurrence(*SE), Value); in addToCoefficient()
3066 return SE->getAddRecExpr(AddRec->getStart(), in addToCoefficient()
3071 if (SE->isLoopInvariant(AddRec, TargetLoop)) in addToCoefficient()
3072 return SE->getAddRecExpr(AddRec, Value, TargetLoop, SCEV::FlagAnyWrap); in addToCoefficient()
3073 return SE->getAddRecExpr( in addToCoefficient()
3075 AddRec->getStepRecurrence(*SE), AddRec->getLoop(), in addToCoefficient()
3122 const SCEV *DA_K = SE->getMulExpr(A_K, CurConstraint.getD()); in propagateDistance()
3123 Src = SE->getMinusSCEV(Src, DA_K); in propagateDistance()
3127 Dst = addToCoefficient(Dst, CurLoop, SE->getNegativeSCEV(A_K)); in propagateDistance()
3161 Src = SE->getMinusSCEV(Src, SE->getMulExpr(AP_K, SE->getConstant(CdivB))); in propagateLine()
3175 Src = SE->getAddExpr(Src, SE->getMulExpr(A_K, SE->getConstant(CdivA))); in propagateLine()
3189 Src = SE->getAddExpr(Src, SE->getMulExpr(A_K, SE->getConstant(CdivA))); in propagateLine()
3198 Src = SE->getMulExpr(Src, A); in propagateLine()
3199 Dst = SE->getMulExpr(Dst, A); in propagateLine()
3200 Src = SE->getAddExpr(Src, SE->getMulExpr(A_K, C)); in propagateLine()
3202 Dst = addToCoefficient(Dst, CurLoop, SE->getMulExpr(A_K, B)); in propagateLine()
3220 const SCEV *XA_K = SE->getMulExpr(A_K, CurConstraint.getX()); in propagatePoint()
3221 const SCEV *YAP_K = SE->getMulExpr(AP_K, CurConstraint.getY()); in propagatePoint()
3223 Src = SE->getAddExpr(Src, SE->getMinusSCEV(XA_K, YAP_K)); in propagatePoint()
3245 if (!SE->isKnownNonZero(Level.Distance)) // if may be zero in updateDirection()
3247 if (!SE->isKnownNonPositive(Level.Distance)) // if may be positive in updateDirection()
3249 if (!SE->isKnownNonNegative(Level.Distance)) // if may be negative in updateDirection()
3295 const SCEV *SrcAccessFn = SE->getSCEVAtScope(SrcPtr, SrcLoop); in tryDelinearize()
3296 const SCEV *DstAccessFn = SE->getSCEVAtScope(DstPtr, DstLoop); in tryDelinearize()
3298 dyn_cast<SCEVUnknown>(SE->getPointerBase(SrcAccessFn)); in tryDelinearize()
3300 dyn_cast<SCEVUnknown>(SE->getPointerBase(DstAccessFn)); in tryDelinearize()
3346 dyn_cast<SCEVUnknown>(SE->getPointerBase(SrcAccessFn)); in tryDelinearizeFixedSize()
3348 dyn_cast<SCEVUnknown>(SE->getPointerBase(DstAccessFn)); in tryDelinearizeFixedSize()
3355 if (!tryDelinearizeFixedSizeImpl(SE, Src, SrcAccessFn, SrcSubscripts, in tryDelinearizeFixedSize()
3357 !tryDelinearizeFixedSizeImpl(SE, Dst, DstAccessFn, DstSubscripts, in tryDelinearizeFixedSize()
3393 const SCEV *Range = SE->getConstant( in tryDelinearizeFixedSize()
3425 dyn_cast<SCEVUnknown>(SE->getPointerBase(SrcAccessFn)); in tryDelinearizeParametricSize()
3427 dyn_cast<SCEVUnknown>(SE->getPointerBase(DstAccessFn)); in tryDelinearizeParametricSize()
3431 const SCEV *ElementSize = SE->getElementSize(Src); in tryDelinearizeParametricSize()
3432 if (ElementSize != SE->getElementSize(Dst)) in tryDelinearizeParametricSize()
3435 const SCEV *SrcSCEV = SE->getMinusSCEV(SrcAccessFn, SrcBase); in tryDelinearizeParametricSize()
3436 const SCEV *DstSCEV = SE->getMinusSCEV(DstAccessFn, DstBase); in tryDelinearizeParametricSize()
3445 collectParametricTerms(*SE, SrcAR, Terms); in tryDelinearizeParametricSize()
3446 collectParametricTerms(*SE, DstAR, Terms); in tryDelinearizeParametricSize()
3450 findArrayDimensions(*SE, Terms, Sizes, ElementSize); in tryDelinearizeParametricSize()
3453 computeAccessFunctions(*SE, SrcAR, SrcSubscripts, Sizes); in tryDelinearizeParametricSize()
3454 computeAccessFunctions(*SE, DstAR, DstSubscripts, Sizes); in tryDelinearizeParametricSize()
3573 const SCEV *SrcSCEV = SE->getSCEV(SrcPtr); in depends()
3574 const SCEV *DstSCEV = SE->getSCEV(DstPtr); in depends()
3577 if (SE->getPointerBase(SrcSCEV) != SE->getPointerBase(DstSCEV)) { in depends()
3724 NewConstraint.setAny(SE); in depends()
3765 Constraints[II].setAny(SE); in depends()
3984 const SCEV *SrcSCEV = SE->getSCEV(SrcPtr); in getSplitIteration()
3985 const SCEV *DstSCEV = SE->getSCEV(DstPtr); in getSplitIteration()
4050 NewConstraint.setAny(SE); in getSplitIteration()
4079 Constraints[II].setAny(SE); in getSplitIteration()