Home | History | Annotate | Download | only in Analysis

Lines Matching refs:SE

365   SE->forgetMemoizedResults(this);
368 SE->UniqueSCEVs.RemoveNode(this);
376 SE->forgetMemoizedResults(this);
379 SE->UniqueSCEVs.RemoveNode(this);
681 ScalarEvolution &SE,
685 return SE.getTruncateOrZeroExtend(It, ResultTy);
739 return SE.getCouldNotCompute();
741 unsigned W = SE.getTypeSizeInBits(ResultTy);
772 IntegerType *CalculationTy = IntegerType::get(SE.getContext(),
774 const SCEV *Dividend = SE.getTruncateOrZeroExtend(It, CalculationTy);
776 const SCEV *S = SE.getMinusSCEV(It, SE.getConstant(It->getType(), i));
777 Dividend = SE.getMulExpr(Dividend,
778 SE.getTruncateOrZeroExtend(S, CalculationTy));
782 const SCEV *DivResult = SE.getUDivExpr(Dividend, SE.getConstant(DivFactor));
786 return SE.getMulExpr(SE.getConstant(MultiplyFactor),
787 SE.getTruncateOrZeroExtend(DivResult, ResultTy));
800 ScalarEvolution &SE) const {
806 const SCEV *Coeff = BinomialCoefficient(It, i, SE, getType());
810 Result = SE.getAddExpr(Result, SE.getMulExpr(getOperand(i), Coeff));
1062 ScalarEvolution *SE) {
1063 unsigned BitWidth = SE->getTypeSizeInBits(Step->getType());
1064 if (SE->isKnownPositive(Step)) {
1066 return SE->getConstant(APInt::getSignedMinValue(BitWidth) -
1067 SE->getSignedRange(Step).getSignedMax());
1069 if (SE->isKnownNegative(Step)) {
1071 return SE->getConstant(APInt::getSignedMaxValue(BitWidth) -
1072 SE->getSignedRange(Step).getSignedMin());
1085 ScalarEvolution *SE) {
1088 const SCEV *Step = AR->getStepRecurrence(*SE);
1111 const SCEV *PreStart = SE->getAddExpr(DiffOps, SA->getNoWrapFlags());
1113 SE->getAddRecExpr(PreStart, Step, L, SCEV::FlagAnyWrap));
1119 unsigned BitWidth = SE->getTypeSizeInBits(AR->getType());
1120 Type *WideTy = IntegerType::get(SE->getContext(), BitWidth * 2);
1122 SE->getAddExpr(SE->getSignExtendExpr(PreStart, WideTy),
1123 SE->getSignExtendExpr(Step, WideTy));
1124 if (SE->getSignExtendExpr(Start, WideTy) == OperandExtendedStart) {
1135 const SCEV *OverflowLimit = getOverflowLimitForStep(Step, &Pred, SE);
1138 SE->isLoopEntryGuardedByCond(L, Pred, PreStart, OverflowLimit)) {
1147 ScalarEvolution *SE) {
1148 const SCEV *PreStart = getPreStartForSignExtend(AR, Ty, SE);
1150 return SE->getSignExtendExpr(AR->getStart(), Ty);
1152 return SE->getAddExpr(SE->getSignExtendExpr(AR->getStepRecurrence(*SE), Ty),
1153 SE->getSignExtendExpr(PreStart, Ty));
1387 ScalarEvolution &SE) {
1413 NewScale, SE);
1418 const SCEV *Key = SE.getMulExpr(MulOps);
4189 /// getExact(ExitingBlock, SE).
4191 ScalarEvolution::BackedgeTakenInfo::getExact(ScalarEvolution *SE) const {
4193 if (!ExitNotTaken.isCompleteList()) return SE->getCouldNotCompute();
4196 if (!ExitNotTaken.ExitingBlock) return SE->getCouldNotCompute();
4203 assert(ENT->ExactNotTaken != SE->getCouldNotCompute() && "bad exit SCEV");
4208 return SE->getCouldNotCompute();
4217 ScalarEvolution *SE) const {
4224 return SE->getCouldNotCompute();
4229 ScalarEvolution::BackedgeTakenInfo::getMax(ScalarEvolution *SE) const {
4230 return Max ? Max : SE->getCouldNotCompute();
4574 ScalarEvolution &SE) {
4575 const SCEV *InVal = SE.getConstant(C);
4576 const SCEV *Val = AddRec->evaluateAtIteration(InVal, SE);
5306 ScalarEvolution &SE) {
5323 return SE.getCouldNotCompute();
5341 return SE.getConstant(Result.trunc(BW));
5349 SolveQuadraticEquation(const SCEVAddRecExpr *AddRec, ScalarEvolution &SE) {
5357 const SCEV *CNC = SE.getCouldNotCompute();
5386 const SCEV *CNC = SE.getCouldNotCompute();
5399 const SCEV *CNC = SE.getCouldNotCompute();
5403 LLVMContext &Context = SE.getContext();
5410 return std::make_pair(SE.getConstant(Solution1),
5411 SE.getConstant(Solution2));
6419 ScalarEvolution &SE) const {
6421 return SE.getCouldNotCompute();
6427 Operands[0] = SE.getConstant(SC->getType(), 0);
6428 const SCEV *Shifted = SE.getAddRecExpr(Operands, getLoop(),
6433 Range.subtract(SC->getValue()->getValue()), SE);
6435 return SE.getCouldNotCompute();
6442 SE.getCouldNotCompute();
6450 unsigned BitWidth = SE.getTypeSizeInBits(getType());
6452 return SE.getConstant(getType(), 0);
6468 ConstantInt *ExitValue = ConstantInt::get(SE.getContext(), ExitVal);
6473 ConstantInt *Val = EvaluateConstantChrecAtConstant(this, ExitValue, SE);
6475 return SE.getCouldNotCompute(); // Something strange happened
6480 ConstantInt::get(SE.getContext(), ExitVal - One), SE)->getValue()) &&
6482 return SE.getConstant(ExitValue);
6489 NewOps[0] = SE.getNegativeSCEV(SE.getConstant(Range.getUpper()));
6490 const SCEV *NewAddRec = SE.getAddRecExpr(NewOps, getLoop(),
6496 SolveQuadraticEquation(cast<SCEVAddRecExpr>(NewAddRec), SE);
6512 SE);
6516 ConstantInt::get(SE.getContext(), R1->getValue()->getValue()+1);
6518 R1Val = EvaluateConstantChrecAtConstant(this, NextVal, SE);
6520 return SE.getConstant(NextVal);
6521 return SE.getCouldNotCompute(); // Something strange happened
6527 ConstantInt::get(SE.getContext(), R1->getValue()->getValue()-1);
6528 R1Val = EvaluateConstantChrecAtConstant(this, NextVal, SE);
6531 return SE.getCouldNotCompute(); // Something strange happened
6536 return SE.getCouldNotCompute();
6546 assert(SE && "SCEVCallbackVH called with a null ScalarEvolution!");
6548 SE->ConstantEvolutionLoopExitValue.erase(PN);
6549 SE->ValueExprMap.erase(getValPtr());
6554 assert(SE && "SCEVCallbackVH called with a null ScalarEvolution!");
6574 SE->ConstantEvolutionLoopExitValue.erase(PN);
6575 SE->ValueExprMap.erase(U);
6582 SE->ConstantEvolutionLoopExitValue.erase(PN);
6583 SE->ValueExprMap.erase(Old);
6587 ScalarEvolution::SCEVCallbackVH::SCEVCallbackVH(Value *V, ScalarEvolution *se)
6588 : CallbackVH(V), SE(se) {}
6649 static void PrintLoopInfo(raw_ostream &OS, ScalarEvolution *SE,
6653 PrintLoopInfo(OS, SE, *I);
6664 if (SE->hasLoopInvariantBackedgeTakenCount(L)) {
6665 OS << "backedge-taken count is " << *SE->getBackedgeTakenCount(L);
6675 if (!isa<SCEVCouldNotCompute>(SE->getMaxBackedgeTakenCount(L))) {
6676 OS << "max backedge-taken count is " << *SE->getMaxBackedgeTakenCount(L);
6691 ScalarEvolution &SE = *const_cast<ScalarEvolution *>(this);
6700 const SCEV *SV = SE.getSCEV(&*I);
6705 const SCEV *AtUse = SE.getSCEVAtScope(SV, L);
6713 const SCEV *ExitValue = SE.getSCEVAtScope(SV, L->getParentLoop());
6714 if (!SE.isLoopInvariant(ExitValue, L)) {
6728 PrintLoopInfo(OS, &SE, *I);
6958 getLoopBackedgeTakenCounts(Loop *L, VerifyMap &Map, ScalarEvolution &SE) {
6960 getLoopBackedgeTakenCounts(*I, Map, SE); // recurse.
6965 SE.getBackedgeTakenCount(L)->print(OS);
6982 ScalarEvolution &SE = *const_cast<ScalarEvolution *>(this);
6989 getLoopBackedgeTakenCounts(*I, BackedgeDumpsOld, SE);
6993 SE.releaseMemory();
6995 getLoopBackedgeTakenCounts(*I, BackedgeDumpsNew, SE);