Lines Matching full:delta
96 STATISTIC(DeltaApplications, "Delta applications");
97 STATISTIC(DeltaSuccesses, "Delta successes");
98 STATISTIC(DeltaIndependence, "Delta independence");
99 STATISTIC(DeltaPropagations, "Delta propagations");
899 const SCEV *Delta = SE->getMinusSCEV(X, Y);
902 return Delta->isZero();
904 return SE->isKnownNonZero(Delta);
906 return SE->isKnownNonNegative(Delta);
908 return SE->isKnownNonPositive(Delta);
910 return SE->isKnownPositive(Delta);
912 return SE->isKnownNegative(Delta);
1021 const SCEV *Delta = SE->getMinusSCEV(SrcConst, DstConst);
1022 DEBUG(dbgs() << "\t Delta = " << *Delta);
1023 DEBUG(dbgs() << ", " << *Delta->getType() << "\n");
1025 // check that |Delta| < iteration count
1026 if (const SCEV *UpperBound = collectUpperBound(CurLoop, Delta->getType())) {
1030 SE->isKnownNonNegative(Delta) ? Delta : SE->getNegativeSCEV(Delta);
1043 if (isa<SCEVConstant>(Delta) && isa<SCEVConstant>(Coeff)) {
1044 APInt ConstDelta = cast<SCEVConstant>(Delta)->getValue()->getValue();
1051 // Make sure Coeff divides Delta exactly
1068 else if (Delta->isZero()) {
1070 Result.DV[Level].Distance = Delta;
1071 NewConstraint.setDistance(Delta, CurLoop);
1077 DEBUG(dbgs() << "\t Distance = " << *Delta << "\n");
1078 Result.DV[Level].Distance = Delta; // since X/1 == X
1079 NewConstraint.setDistance(Delta, CurLoop);
1085 SE->getNegativeSCEV(Delta), CurLoop);
1089 bool DeltaMaybeZero = !SE->isKnownNonZero(Delta);
1090 bool DeltaMaybePositive = !SE->isKnownNonPositive(Delta);
1091 bool DeltaMaybeNegative = !SE->isKnownNonNegative(Delta);
1095 // It helps to read !SE->isKnownNonZero(Delta)
1096 // as "Delta might be Zero"
1158 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst);
1159 DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
1160 NewConstraint.setLine(Coeff, Coeff, Delta, CurLoop);
1161 if (Delta->isZero()) {
1169 Result.DV[Level].Distance = Delta; // = 0
1181 Delta = SE->getNegativeSCEV(Delta);
1187 SE->getUDivExpr(SE->getSMaxExpr(SE->getConstant(Delta->getType(), 0),
1188 Delta),
1189 SE->getMulExpr(SE->getConstant(Delta->getType(), 2),
1193 const SCEVConstant *ConstDelta = dyn_cast<SCEVConstant>(Delta);
1198 // if Delta < 0, then no dependence.
1199 DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
1201 if (SE->isKnownNegative(Delta)) {
1202 // No dependence, Delta < 0
1208 // We're certain that Delta > 0 and ConstCoeff > 0.
1209 // Check Delta/(2*ConstCoeff) against upper loop bound
1210 if (const SCEV *UpperBound = collectUpperBound(CurLoop, Delta->getType())) {
1216 if (isKnownPredicate(CmpInst::ICMP_SGT, Delta, ML)) {
1217 // Delta too big, no dependence
1222 if (isKnownPredicate(CmpInst::ICMP_EQ, Delta, ML)) {
1232 Result.DV[Level].Distance = SE->getConstant(Delta->getType(), 0);
1237 // check that Coeff divides Delta
1245 // Coeff doesn't divide Delta, no dependence
1252 // if 2*Coeff doesn't divide Delta, then the equal direction isn't possible
1274 // Returns true iff the gcd divides Delta.
1276 bool findGCD(unsigned Bits, APInt AM, APInt BM, APInt Delta,
1296 // make sure gcd divides Delta
1297 R = Delta.srem(G);
1299 return true; // gcd doesn't divide Delta, no dependence
1300 Q = Delta.sdiv(G);
1381 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst);
1382 DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
1384 Delta, CurLoop);
1385 Delta);
1397 // gcd doesn't divide Delta, no dependence
1410 collectConstantUpperBound(CurLoop, Delta->getType())) {
1594 const SCEV *Delta = SE->getMinusSCEV(SrcConst, DstConst);
1595 NewConstraint.setLine(SE->getConstant(Delta->getType(), 0),
1596 DstCoeff, Delta, CurLoop);
1597 DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
1613 SE->isKnownNegative(ConstCoeff) ? SE->getNegativeSCEV(Delta) : Delta;
1615 // check that Delta/SrcCoeff < iteration count
1617 if (const SCEV *UpperBound = collectUpperBound(CurLoop, Delta->getType())) {
1636 // check that Delta/SrcCoeff >= 0
1645 // if SrcCoeff doesn't divide Delta, then no dependence
1646 if (isa<SCEVConstant>(Delta) &&
1647 !isRemainderZero(cast<SCEVConstant>(Delta), ConstCoeff)) {
1704 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst);
1705 NewConstraint.setLine(SrcCoeff, SE->getConstant(Delta->getType(), 0),
1706 Delta, CurLoop);
1707 DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
1723 SE->isKnownNegative(ConstCoeff) ? SE->getNegativeSCEV(Delta) : Delta;
1725 // check that Delta/SrcCoeff < iteration count
1727 if (const SCEV *UpperBound = collectUpperBound(CurLoop, Delta->getType())) {
1746 // check that Delta/SrcCoeff >= 0
1755 // if SrcCoeff doesn't divide Delta, then no dependence
1756 if (isa<SCEVConstant>(Delta) &&
1757 !isRemainderZero(cast<SCEVConstant>(Delta), ConstCoeff)) {
1787 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst);
1788 DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
1789 const SCEVConstant *ConstDelta = dyn_cast<SCEVConstant>(Delta);
1801 // gcd doesn't divide Delta, no dependence
1813 collectConstantUpperBound(SrcLoop, Delta->getType())) {
1823 collectConstantUpperBound(DstLoop, Delta->getType())) {
2265 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst);
2266 DEBUG(dbgs() << " Delta = " << *Delta << "\n");
2267 const SCEVConstant *Constant = dyn_cast<SCEVConstant>(Delta);
2268 if (const SCEVAddExpr *Sum = dyn_cast<SCEVAddExpr>(Delta)) {
2269 // If Delta is a sum of products, we may be able to make further progress.
2363 Delta = SE->getMinusSCEV(SrcCoeff, DstCoeff);
2364 if (const SCEVMulExpr *Product = dyn_cast<SCEVMulExpr>(Delta))
2368 else if (isa<SCEVConstant>(Delta))
2369 Constant = cast<SCEVConstant>(Delta);
2441 const SCEV *Delta = SE->getMinusSCEV(B0, A0);
2442 DEBUG(dbgs() << "\tDelta = " << *Delta << '\n');
2466 if (testBounds(Dependence::DVEntry::ALL, 0, Bound, Delta)) {
2470 Loops, DepthExpanded, Delta);
2515 const SCEV *Delta) const {
2587 if (testBounds(Dependence::DVEntry::LT, Level, Bound, Delta))
2589 Loops, DepthExpanded, Delta);
2592 if (testBounds(Dependence::DVEntry::EQ, Level, Bound, Delta))
2594 Loops, DepthExpanded, Delta);
2597 if (testBounds(Dependence::DVEntry::GT, Level, Bound, Delta))
2599 Loops, DepthExpanded, Delta);
2605 return exploreDirections(Level + 1, A, B, Bound, Loops, DepthExpanded, Delta);
2613 const SCEV *Delta) const {
2616 if (isKnownPredicate(CmpInst::ICMP_SGT, LowerBound, Delta))
2619 if (isKnownPredicate(CmpInst::ICMP_SGT, Delta, UpperBound))
2688 const SCEV *Delta = SE->getMinusSCEV(A[K].Coeff, B[K].Coeff);
2689 const SCEV *NegativePart = getNegativePart(Delta);
2692 const SCEV *PositivePart = getPositivePart(Delta);
2699 const SCEV *Delta = SE->getMinusSCEV(A[K].Coeff, B[K].Coeff);
2700 const SCEV *NegativePart = getNegativePart(Delta);
2703 const SCEV *PositivePart = getPositivePart(Delta);
2893 // Constraint manipulation for Delta test.