Lines Matching refs:SCEV
209 static bool FactorOutConstant(const SCEV *&S, const SCEV *&Remainder, in FactorOutConstant()
210 const SCEV *Factor, ScalarEvolution &SE, in FactorOutConstant()
237 const SCEV *Div = SE.getConstant(CI); in FactorOutConstant()
256 SmallVector<const SCEV *, 4> NewMulOps(M->op_begin(), M->op_end()); in FactorOutConstant()
266 const SCEV *Step = A->getStepRecurrence(SE); in FactorOutConstant()
267 const SCEV *StepRem = SE.getConstant(Step->getType(), 0); in FactorOutConstant()
272 const SCEV *Start = A->getStart(); in FactorOutConstant()
276 A->getNoWrapFlags(SCEV::FlagNW)); in FactorOutConstant()
287 static void SimplifyAddOperands(SmallVectorImpl<const SCEV *> &Ops, in SimplifyAddOperands()
294 SmallVector<const SCEV *, 8> NoAddRecs(Ops.begin(), Ops.end() - NumAddRecs); in SimplifyAddOperands()
295 SmallVector<const SCEV *, 8> AddRecs(Ops.end() - NumAddRecs, Ops.end()); in SimplifyAddOperands()
297 const SCEV *Sum = NoAddRecs.empty() ? in SimplifyAddOperands()
316 static void SplitAddRecs(SmallVectorImpl<const SCEV *> &Ops, in SplitAddRecs()
320 SmallVector<const SCEV *, 8> AddRecs; in SplitAddRecs()
323 const SCEV *Start = A->getStart(); in SplitAddRecs()
325 const SCEV *Zero = SE.getConstant(Ty, 0); in SplitAddRecs()
329 A->getNoWrapFlags(SCEV::FlagNW))); in SplitAddRecs()
373 Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin, in expandAddToGEP()
374 const SCEV *const *op_end, in expandAddToGEP()
381 SmallVector<const SCEV *, 8> Ops(op_begin, op_end); in expandAddToGEP()
398 SmallVector<const SCEV *, 8> ScaledOps; in expandAddToGEP()
400 const SCEV *ElSize = SE.getSizeOfExpr(IntPtrTy, ElTy); in expandAddToGEP()
402 SmallVector<const SCEV *, 8> NewOps; in expandAddToGEP()
404 const SCEV *Op = Ops[i]; in expandAddToGEP()
405 const SCEV *Remainder = SE.getConstant(Ty, 0); in expandAddToGEP()
592 const Loop *SCEVExpander::getRelevantLoop(const SCEV *S) { in getRelevantLoop()
594 std::pair<DenseMap<const SCEV *, const Loop *>::iterator, bool> Pair = in getRelevantLoop()
639 bool operator()(std::pair<const Loop *, const SCEV *> LHS, in operator ()()
640 std::pair<const Loop *, const SCEV *> RHS) const { in operator ()()
673 SmallVector<std::pair<const Loop *, const SCEV *>, 8> OpsAndLoops; in visitAddExpr()
685 for (SmallVectorImpl<std::pair<const Loop *, const SCEV *> >::iterator in visitAddExpr()
688 const SCEV *Op = I->second; in visitAddExpr()
696 SmallVector<const SCEV *, 4> NewOps; in visitAddExpr()
700 const SCEV *X = I->second; in visitAddExpr()
711 SmallVector<const SCEV *, 4> NewOps; in visitAddExpr()
742 SmallVector<std::pair<const Loop *, const SCEV *>, 8> OpsAndLoops; in visitMulExpr()
753 for (SmallVectorImpl<std::pair<const Loop *, const SCEV *> >::iterator in visitMulExpr()
755 const SCEV *Op = I->second; in visitMulExpr()
797 static void ExposePointerBase(const SCEV *&Base, const SCEV *&Rest, in ExposePointerBase()
805 A->getNoWrapFlags(SCEV::FlagNW))); in ExposePointerBase()
809 SmallVector<const SCEV *, 8> NewAddOps(A->op_begin(), A->op_end()); in ExposePointerBase()
967 const SCEV *const StepArray[1] = { SE.getSCEV(StepV) }; in expandIVInc()
1036 const SCEV *Step = AR->getStepRecurrence(SE); in IsIncrementNSW()
1037 const SCEV *OpAfterExtend = SE.getAddExpr(SE.getSignExtendExpr(Step, WideTy), in IsIncrementNSW()
1039 const SCEV *ExtendAfterOp = in IsIncrementNSW()
1050 const SCEV *Step = AR->getStepRecurrence(SE); in IsIncrementNUW()
1051 const SCEV *OpAfterExtend = SE.getAddExpr(SE.getZeroExtendExpr(Step, WideTy), in IsIncrementNUW()
1053 const SCEV *ExtendAfterOp = in IsIncrementNUW()
1173 const SCEV *Step = Normalized->getStepRecurrence(SE); in getAddRecExprPHILiterally()
1251 const SCEV *Start = Normalized->getStart(); in expandAddRecExprLiterally()
1252 const SCEV *PostLoopOffset = nullptr; in expandAddRecExprLiterally()
1259 Normalized->getNoWrapFlags(SCEV::FlagNW))); in expandAddRecExprLiterally()
1263 const SCEV *Step = Normalized->getStepRecurrence(SE); in expandAddRecExprLiterally()
1264 const SCEV *PostLoopScale = nullptr; in expandAddRecExprLiterally()
1271 Normalized->getNoWrapFlags(SCEV::FlagNW))); in expandAddRecExprLiterally()
1355 const SCEV *const OffsetArray[1] = { PostLoopOffset }; in expandAddRecExprLiterally()
1385 SmallVector<const SCEV *, 4> NewOps(S->getNumOperands()); in visitAddRecExpr()
1389 S->getNoWrapFlags(SCEV::FlagNW))); in visitAddRecExpr()
1403 SmallVector<const SCEV *, 4> NewOps(S->op_begin(), S->op_end()); in visitAddRecExpr()
1405 const SCEV *Rest = SE.getAddRecExpr(NewOps, L, in visitAddRecExpr()
1406 S->getNoWrapFlags(SCEV::FlagNW)); in visitAddRecExpr()
1410 const SCEV *Base = S->getStart(); in visitAddRecExpr()
1411 const SCEV *RestArray[1] = { Rest }; in visitAddRecExpr()
1490 const SCEV *IH = SE.getUnknown(CanonicalIV); // Get I as a "symbolic" SCEV. in visitAddRecExpr()
1493 const SCEV *NewS = S; in visitAddRecExpr()
1494 const SCEV *Ext = SE.getNoopOrAnyExtend(S, CanonicalIV->getType()); in visitAddRecExpr()
1498 const SCEV *V = cast<SCEVAddRecExpr>(NewS)->evaluateAtIteration(IH, SE); in visitAddRecExpr()
1502 const SCEV *T = SE.getTruncateOrNoop(V, Ty); in visitAddRecExpr()
1581 Value *SCEVExpander::expandCodeFor(const SCEV *SH, Type *Ty, in expandCodeFor()
1587 Value *SCEVExpander::expandCodeFor(const SCEV *SH, Type *Ty) { in expandCodeFor()
1598 Value *SCEVExpander::expand(const SCEV *S) { in expand()
1629 std::map<std::pair<const SCEV *, Instruction *>, TrackingVH<Value> >::iterator in expand()
1668 const SCEV *H = SE.getAddRecExpr(SE.getConstant(Ty, 0), in getOrInsertCanonicalInductionVariable()
1669 SE.getConstant(Ty, 1), L, SCEV::FlagAnyWrap); in getOrInsertCanonicalInductionVariable()
1704 DenseMap<const SCEV *, PHINode *> ExprToIVMap; in replaceCongruentIVs()
1732 const SCEV *TruncExpr = in replaceCongruentIVs()
1767 const SCEV *TruncExpr = SE.getTruncateOrNoop(SE.getSCEV(OrigInc), in replaceCongruentIVs()
1809 const SCEV *S, Loop *L, SmallPtrSetImpl<const SCEV *> &Processed) { in isHighCostExpansionHelper()
1842 const SCEV *RHS = SE.getSCEV(OrigCond->getOperand(1)); in isHighCostExpansionHelper()
1845 const SCEV *LHS = SE.getSCEV(OrigCond->getOperand(0)); in isHighCostExpansionHelper()
1901 bool follow(const SCEV *S) { in follow()
1910 const SCEV *Step = AR->getStepRecurrence(SE); in follow()
1923 bool isSafeToExpand(const SCEV *S, ScalarEvolution &SE) { in isSafeToExpand()