Lines Matching defs:Delta
97 STATISTIC(DeltaApplications, "Delta applications");
98 STATISTIC(DeltaSuccesses, "Delta successes");
99 STATISTIC(DeltaIndependence, "Delta independence");
100 STATISTIC(DeltaPropagations, "Delta propagations");
1077 const SCEV *Delta = SE->getMinusSCEV(X, Y);
1080 return Delta->isZero();
1082 return SE->isKnownNonZero(Delta);
1084 return SE->isKnownNonNegative(Delta);
1086 return SE->isKnownNonPositive(Delta);
1088 return SE->isKnownPositive(Delta);
1090 return SE->isKnownNegative(Delta);
1246 const SCEV *Delta = SE->getMinusSCEV(SrcConst, DstConst);
1247 LLVM_DEBUG(dbgs() << "\t Delta = " << *Delta);
1248 LLVM_DEBUG(dbgs() << ", " << *Delta->getType() << "\n");
1250 // check that |Delta| < iteration count
1251 if (const SCEV *UpperBound = collectUpperBound(CurLoop, Delta->getType())) {
1255 SE->isKnownNonNegative(Delta) ? Delta : SE->getNegativeSCEV(Delta);
1268 if (isa<SCEVConstant>(Delta) && isa<SCEVConstant>(Coeff)) {
1269 APInt ConstDelta = cast<SCEVConstant>(Delta)->getAPInt();
1276 // Make sure Coeff divides Delta exactly
1293 else if (Delta->isZero()) {
1295 Result.DV[Level].Distance = Delta;
1296 NewConstraint.setDistance(Delta, CurLoop);
1302 LLVM_DEBUG(dbgs() << "\t Distance = " << *Delta << "\n");
1303 Result.DV[Level].Distance = Delta; // since X/1 == X
1304 NewConstraint.setDistance(Delta, CurLoop);
1310 SE->getNegativeSCEV(Delta), CurLoop);
1314 bool DeltaMaybeZero = !SE->isKnownNonZero(Delta);
1315 bool DeltaMaybePositive = !SE->isKnownNonPositive(Delta);
1316 bool DeltaMaybeNegative = !SE->isKnownNonNegative(Delta);
1320 // It helps to read !SE->isKnownNonZero(Delta)
1321 // as "Delta might be Zero"
1379 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst);
1380 LLVM_DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
1381 NewConstraint.setLine(Coeff, Coeff, Delta, CurLoop);
1382 if (Delta->isZero()) {
1390 Result.DV[Level].Distance = Delta; // = 0
1402 Delta = SE->getNegativeSCEV(Delta);
1408 SE->getSMaxExpr(SE->getZero(Delta->getType()), Delta),
1409 SE->getMulExpr(SE->getConstant(Delta->getType(), 2), ConstCoeff));
1412 const SCEVConstant *ConstDelta = dyn_cast<SCEVConstant>(Delta);
1417 // if Delta < 0, then no dependence.
1418 LLVM_DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
1420 if (SE->isKnownNegative(Delta)) {
1421 // No dependence, Delta < 0
1427 // We're certain that Delta > 0 and ConstCoeff > 0.
1428 // Check Delta/(2*ConstCoeff) against upper loop bound
1429 if (const SCEV *UpperBound = collectUpperBound(CurLoop, Delta->getType())) {
1435 if (isKnownPredicate(CmpInst::ICMP_SGT, Delta, ML)) {
1436 // Delta too big, no dependence
1441 if (isKnownPredicate(CmpInst::ICMP_EQ, Delta, ML)) {
1451 Result.DV[Level].Distance = SE->getZero(Delta->getType());
1456 // check that Coeff divides Delta
1464 // Coeff doesn't divide Delta, no dependence
1471 // if 2*Coeff doesn't divide Delta, then the equal direction isn't possible
1493 // Returns true if dependence disproved; i.e., gcd does not divide Delta.
1495 const APInt &Delta, APInt &G, APInt &X, APInt &Y) {
1514 // make sure gcd divides Delta
1515 R = Delta.srem(G);
1517 return true; // gcd doesn't divide Delta, no dependence
1518 Q = Delta.sdiv(G);
1581 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst);
1582 LLVM_DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
1583 NewConstraint.setLine(SrcCoeff, SE->getNegativeSCEV(DstCoeff), Delta,
1585 const SCEVConstant *ConstDelta = dyn_cast<SCEVConstant>(Delta);
1598 // gcd doesn't divide Delta, no dependence
1611 collectConstantUpperBound(CurLoop, Delta->getType())) {
1777 const SCEV *Delta = SE->getMinusSCEV(SrcConst, DstConst);
1778 NewConstraint.setLine(SE->getZero(Delta->getType()), DstCoeff, Delta,
1780 LLVM_DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
1796 SE->isKnownNegative(ConstCoeff) ? SE->getNegativeSCEV(Delta) : Delta;
1798 // check that Delta/SrcCoeff < iteration count
1800 if (const SCEV *UpperBound = collectUpperBound(CurLoop, Delta->getType())) {
1819 // check that Delta/SrcCoeff >= 0
1828 // if SrcCoeff doesn't divide Delta, then no dependence
1829 if (isa<SCEVConstant>(Delta) &&
1830 !isRemainderZero(cast<SCEVConstant>(Delta), ConstCoeff)) {
1886 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst);
1887 NewConstraint.setLine(SrcCoeff, SE->getZero(Delta->getType()), Delta,
1889 LLVM_DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
1905 SE->isKnownNegative(ConstCoeff) ? SE->getNegativeSCEV(Delta) : Delta;
1907 // check that Delta/SrcCoeff < iteration count
1909 if (const SCEV *UpperBound = collectUpperBound(CurLoop, Delta->getType())) {
1928 // check that Delta/SrcCoeff >= 0
1937 // if SrcCoeff doesn't divide Delta, then no dependence
1938 if (isa<SCEVConstant>(Delta) &&
1939 !isRemainderZero(cast<SCEVConstant>(Delta), ConstCoeff)) {
1966 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst);
1967 LLVM_DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
1968 const SCEVConstant *ConstDelta = dyn_cast<SCEVConstant>(Delta);
1981 // gcd doesn't divide Delta, no dependence
1993 collectConstantUpperBound(SrcLoop, Delta->getType())) {
2003 collectConstantUpperBound(DstLoop, Delta->getType())) {
2449 const SCEV *Delta = SE->getMinusSCEV(DstConst, SrcConst);
2450 LLVM_DEBUG(dbgs() << " Delta = " << *Delta << "\n");
2451 const SCEVConstant *Constant = dyn_cast<SCEVConstant>(Delta);
2452 if (const SCEVAddExpr *Sum = dyn_cast<SCEVAddExpr>(Delta)) {
2453 // If Delta is a sum of products, we may be able to make further progress.
2544 Delta = SE->getMinusSCEV(SrcCoeff, DstCoeff);
2547 Constant = getConstantPart(Delta);
2617 const SCEV *Delta = SE->getMinusSCEV(B0, A0);
2618 LLVM_DEBUG(dbgs() << "\tDelta = " << *Delta << '\n');
2642 if (testBounds(Dependence::DVEntry::ALL, 0, Bound, Delta)) {
2646 Loops, DepthExpanded, Delta);
2689 const SCEV *Delta) const {
2780 if (testBounds(Dependence::DVEntry::LT, Level, Bound, Delta))
2782 Loops, DepthExpanded, Delta);
2785 if (testBounds(Dependence::DVEntry::EQ, Level, Bound, Delta))
2787 Loops, DepthExpanded, Delta);
2790 if (testBounds(Dependence::DVEntry::GT, Level, Bound, Delta))
2792 Loops, DepthExpanded, Delta);
2798 return exploreDirections(Level + 1, A, B, Bound, Loops, DepthExpanded, Delta);
2804 BoundInfo *Bound, const SCEV *Delta) const {
2807 if (isKnownPredicate(CmpInst::ICMP_SGT, LowerBound, Delta))
2810 if (isKnownPredicate(CmpInst::ICMP_SGT, Delta, UpperBound))
2875 const SCEV *Delta = SE->getMinusSCEV(A[K].Coeff, B[K].Coeff);
2876 const SCEV *NegativePart = getNegativePart(Delta);
2879 const SCEV *PositivePart = getPositivePart(Delta);
2886 const SCEV *Delta = SE->getMinusSCEV(A[K].Coeff, B[K].Coeff);
2887 const SCEV *NegativePart = getNegativePart(Delta);
2890 const SCEV *PositivePart = getPositivePart(Delta);
3073 // Constraint manipulation for Delta test.