Lines Matching refs:SCEV
147 const SCEV *Begin = nullptr;
148 const SCEV *Step = nullptr;
149 const SCEV *End = nullptr;
154 const SCEV *&End);
164 const SCEV *&End);
168 const SCEVAddRecExpr *&Index, const SCEV *&End);
171 const SCEV *getBegin() const { return Begin; }
172 const SCEV *getStep() const { return Step; }
173 const SCEV *getEnd() const { return End; }
199 const SCEV *Begin;
200 const SCEV *End;
203 Range(const SCEV *Begin, const SCEV *End) : Begin(Begin), End(End) {
208 const SCEV *getBegin() const { return Begin; }
209 const SCEV *getEnd() const { return End; }
268 /// SCEV being range checked, and set `End` to the upper or lower limit `Index`
273 const SCEV *&End) {
308 const SCEV *&End) {
351 const SCEV *One = SE.getOne(RHS->getType());
352 const SCEV *RHSS = SE.getSCEV(RHS);
369 ScalarEvolution &SE, const SCEVAddRecExpr *&Index, const SCEV *&End) {
374 const SCEV *IV = SE.getSCEV(LHS);
375 const SCEV *Offset = SE.getSCEV(RHS);
376 const SCEV *Limit = SE.getSCEV(InvariantRHS);
431 const SCEV *LHS,
432 const SCEV *RHS) -> const SCEV * {
433 const SCEV *(ScalarEvolution::*Operation)(const SCEV *, const SCEV *,
434 SCEV::NoWrapFlags, unsigned);
448 return (SE.*Operation)(LHS, RHS, SCEV::FlagAnyWrap, 0);
458 SE.getSignExtendExpr(RHS, WideTy), SCEV::FlagAnyWrap,
506 const SCEV *End = nullptr;
557 static const SCEV *NoopOrExtend(const SCEV *S, Type *Ty, ScalarEvolution &SE,
582 const SCEV *Start = NoopOrExtend(SE.getSCEV(MainLoopStructure.IndVarStart),
584 const SCEV *End = NoopOrExtend(SE.getSCEV(MainLoopStructure.LoopExitAt), RTy,
593 const SCEV *Smallest = nullptr, *Greatest = nullptr, *GreatestSeen = nullptr;
595 const SCEV *One = SE.getOne(RTy);
622 auto Clamp = [&SE, Smallest, Greatest, IsSignedPredicate](const SCEV *S) {
688 const SCEV *A = NoopOrExtend(IndVar->getStart(), RCType, SE, IsLatchSigned);
695 const SCEV *C = getBegin();
702 const SCEV *SIntMax = SE.getConstant(APInt::getSignedMaxValue(BitWidth));
703 const SCEV *SIntMin = SE.getConstant(APInt::getSignedMinValue(BitWidth));
717 auto ClampedSubtract = [&](const SCEV *X, const SCEV *Y) {
733 const SCEV *XMinusSIntMax = SE.getMinusSCEV(X, SIntMax);
735 SCEV::FlagNSW);
747 return SE.getMinusSCEV(X, SE.getSMinExpr(X, Y), SCEV::FlagNUW);
749 const SCEV *M = SE.getMinusSCEV(C, A);
750 const SCEV *Zero = SE.getZero(M->getType());
752 // This function returns SCEV equal to 1 if X is non-negative 0 otherwise.
753 auto SCEVCheckNonNegative = [&](const SCEV *X) {
755 const SCEV *Zero = SE.getZero(X->getType());
756 const SCEV *One = SE.getOne(X->getType());
764 const SCEV *NegOne = SE.getNegativeSCEV(One);
768 // This function returns SCEV equal to 1 if X will not overflow in terms of
770 auto SCEVCheckWillNotOverflow = [&](const SCEV *X) {
773 const SCEV *SIntMaxExt = SE.getSignExtendExpr(SIntMax, X->getType());
774 const SCEV *OverflowCheck =
779 const SCEV *SIntMinExt = SE.getSignExtendExpr(SIntMin, X->getType());
780 const SCEV *UnderflowCheck =
794 const SCEV *REnd = getEnd();
795 const SCEV *EndWillNotOverflow = SE.getOne(RCType);
819 const SCEV *RuntimeChecks =
821 const SCEV *Begin = SE.getMulExpr(ClampedSubtract(Zero, M), RuntimeChecks);
822 const SCEV *End = SE.getMulExpr(ClampedSubtract(REnd, M), RuntimeChecks);
846 const SCEV *NewBegin = SE.getSMaxExpr(R1Value.getBegin(), R2.getBegin());
847 const SCEV *NewEnd = SE.getSMinExpr(R1Value.getEnd(), R2.getEnd());
875 const SCEV *NewBegin = SE.getUMaxExpr(R1Value.getBegin(), R2.getBegin());
876 const SCEV *NewEnd = SE.getUMinExpr(R1Value.getEnd(), R2.getEnd());