Lines Matching defs:AddRec

964   const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Expr);
965 if (!AddRec)
968 // The AddRec must depend on one of the containing loops. Otherwise,
974 while (L && AddRec->getLoop() != L)
979 const SCEV *Start = AddRec->getStart();
980 const SCEV *Step = AddRec->getStepRecurrence(*SE);
981 const SCEV *UB = SE->getBackedgeTakenCount(AddRec->getLoop());
985 if (!AddRec->getNoWrapFlags())
992 Loops.set(mapSrcLoop(AddRec->getLoop()));
994 Loops.set(mapDstLoop(AddRec->getLoop()));
1096 /// with some extra checking if S is an AddRec and we can prove less-than using
1111 if (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Bound)) {
1112 if (AddRec->isAffine()) {
1113 const SCEV *BECount = SE->getBackedgeTakenCount(AddRec->getLoop());
1115 const SCEV *Limit = AddRec->evaluateAtIteration(BECount, *SE);
1133 if (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(S)) {
1134 if (AddRec->isAffine()) {
1137 if (SE->isKnownNonNegative(AddRec->getStart()) &&
1138 SE->isKnownNonNegative(AddRec->getOperand(1)))
2276 llvm_unreachable("SIV test expected at least one AddRec");
2345 llvm_unreachable("RDIV expected at least one AddRec");
2414 while (const SCEVAddRecExpr *AddRec =
2416 const SCEV *Coeff = AddRec->getStepRecurrence(*SE);
2424 Coefficients = AddRec->getStart();
2433 while (const SCEVAddRecExpr *AddRec =
2435 const SCEV *Coeff = AddRec->getStepRecurrence(*SE);
2443 Coefficients = AddRec->getStart();
2503 while (const SCEVAddRecExpr *AddRec =
2505 Coefficients = AddRec->getStart();
2506 const Loop *CurLoop = AddRec->getLoop();
2508 const SCEV *SrcCoeff = AddRec->getStepRecurrence(*SE);
2512 AddRec = cast<SCEVAddRecExpr>(Inner);
2513 const SCEV *Coeff = AddRec->getStepRecurrence(*SE);
2514 if (CurLoop == AddRec->getLoop())
2525 Inner = AddRec->getStart();
2529 AddRec = cast<SCEVAddRecExpr>(Inner);
2530 const SCEV *Coeff = AddRec->getStepRecurrence(*SE);
2531 if (CurLoop == AddRec->getLoop())
2542 Inner = AddRec->getStart();
3009 while (const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Subscript)) {
3010 const Loop *L = AddRec->getLoop();
3012 CI[K].Coeff = AddRec->getStepRecurrence(*SE);
3016 Subscript = AddRec->getStart();
3083 const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Expr);
3084 if (!AddRec)
3086 if (AddRec->getLoop() == TargetLoop)
3087 return AddRec->getStepRecurrence(*SE);
3088 return findCoefficient(AddRec->getStart(), TargetLoop);
3099 const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Expr);
3100 if (!AddRec)
3102 if (AddRec->getLoop() == TargetLoop)
3103 return AddRec->getStart();
3104 return SE->getAddRecExpr(zeroCoefficient(AddRec->getStart(), TargetLoop),
3105 AddRec->getStepRecurrence(*SE),
3106 AddRec->getLoop(),
3107 AddRec->getNoWrapFlags());
3119 const SCEVAddRecExpr *AddRec = dyn_cast<SCEVAddRecExpr>(Expr);
3120 if (!AddRec) // create a new addRec
3125 if (AddRec->getLoop() == TargetLoop) {
3126 const SCEV *Sum = SE->getAddExpr(AddRec->getStepRecurrence(*SE), Value);
3128 return AddRec->getStart();
3129 return SE->getAddRecExpr(AddRec->getStart(),
3131 AddRec->getLoop(),
3132 AddRec->getNoWrapFlags());
3134 if (SE->isLoopInvariant(AddRec, TargetLoop))
3135 return SE->getAddRecExpr(AddRec, Value, TargetLoop, SCEV::FlagAnyWrap);
3137 addToCoefficient(AddRec->getStart(), TargetLoop, Value),
3138 AddRec->getStepRecurrence(*SE), AddRec->getLoop(),
3139 AddRec->getNoWrapFlags());