Lines Matching refs:SCEV
185 static bool FactorOutConstant(const SCEV *&S, in FactorOutConstant()
186 const SCEV *&Remainder, in FactorOutConstant()
187 const SCEV *Factor, in FactorOutConstant()
215 const SCEV *Div = SE.getConstant(CI); in FactorOutConstant()
236 SmallVector<const SCEV *, 4> NewMulOps(M->op_begin(), M->op_end()); in FactorOutConstant()
247 const SCEV *SOp = M->getOperand(i); in FactorOutConstant()
248 const SCEV *Remainder = SE.getConstant(SOp->getType(), 0); in FactorOutConstant()
251 SmallVector<const SCEV *, 4> NewMulOps(M->op_begin(), M->op_end()); in FactorOutConstant()
262 const SCEV *Step = A->getStepRecurrence(SE); in FactorOutConstant()
263 const SCEV *StepRem = SE.getConstant(Step->getType(), 0); in FactorOutConstant()
268 const SCEV *Start = A->getStart(); in FactorOutConstant()
272 S = SE.getAddRecExpr(Start, Step, A->getLoop(), SCEV::FlagAnyWrap); in FactorOutConstant()
283 static void SimplifyAddOperands(SmallVectorImpl<const SCEV *> &Ops, in SimplifyAddOperands()
290 SmallVector<const SCEV *, 8> NoAddRecs(Ops.begin(), Ops.end() - NumAddRecs); in SimplifyAddOperands()
291 SmallVector<const SCEV *, 8> AddRecs(Ops.end() - NumAddRecs, Ops.end()); in SimplifyAddOperands()
293 const SCEV *Sum = NoAddRecs.empty() ? in SimplifyAddOperands()
312 static void SplitAddRecs(SmallVectorImpl<const SCEV *> &Ops, in SplitAddRecs()
316 SmallVector<const SCEV *, 8> AddRecs; in SplitAddRecs()
319 const SCEV *Start = A->getStart(); in SplitAddRecs()
321 const SCEV *Zero = SE.getConstant(Ty, 0); in SplitAddRecs()
326 SCEV::FlagAnyWrap)); in SplitAddRecs()
370 Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin, in expandAddToGEP()
371 const SCEV *const *op_end, in expandAddToGEP()
377 SmallVector<const SCEV *, 8> Ops(op_begin, op_end); in expandAddToGEP()
392 SmallVector<const SCEV *, 8> ScaledOps; in expandAddToGEP()
394 const SCEV *ElSize = SE.getSizeOfExpr(ElTy); in expandAddToGEP()
396 SmallVector<const SCEV *, 8> NewOps; in expandAddToGEP()
398 const SCEV *Op = Ops[i]; in expandAddToGEP()
399 const SCEV *Remainder = SE.getConstant(Ty, 0); in expandAddToGEP()
593 static bool isNonConstantNegative(const SCEV *F) { in isNonConstantNegative()
621 const Loop *SCEVExpander::getRelevantLoop(const SCEV *S) { in getRelevantLoop()
623 std::pair<DenseMap<const SCEV *, const Loop *>::iterator, bool> Pair = in getRelevantLoop()
669 bool operator()(std::pair<const Loop *, const SCEV *> LHS, in operator ()()
670 std::pair<const Loop *, const SCEV *> RHS) const { in operator ()()
703 SmallVector<std::pair<const Loop *, const SCEV *>, 8> OpsAndLoops; in visitAddExpr()
715 for (SmallVectorImpl<std::pair<const Loop *, const SCEV *> >::iterator in visitAddExpr()
718 const SCEV *Op = I->second; in visitAddExpr()
726 SmallVector<const SCEV *, 4> NewOps; in visitAddExpr()
730 const SCEV *X = I->second; in visitAddExpr()
741 SmallVector<const SCEV *, 4> NewOps; in visitAddExpr()
772 SmallVector<std::pair<const Loop *, const SCEV *>, 8> OpsAndLoops; in visitMulExpr()
783 for (SmallVectorImpl<std::pair<const Loop *, const SCEV *> >::iterator in visitMulExpr()
785 const SCEV *Op = I->second; in visitMulExpr()
827 static void ExposePointerBase(const SCEV *&Base, const SCEV *&Rest, in ExposePointerBase()
836 SCEV::FlagAnyWrap)); in ExposePointerBase()
840 SmallVector<const SCEV *, 8> NewAddOps(A->op_begin(), A->op_end()); in ExposePointerBase()
1001 const SCEV *Step = Normalized->getStepRecurrence(SE); in getAddRecExprPHILiterally()
1041 const SCEV *const StepArray[1] = { SE.getSCEV(StepV) }; in getAddRecExprPHILiterally()
1083 const SCEV *Start = Normalized->getStart(); in expandAddRecExprLiterally()
1084 const SCEV *PostLoopOffset = 0; in expandAddRecExprLiterally()
1092 SCEV::FlagAnyWrap)); in expandAddRecExprLiterally()
1096 const SCEV *Step = Normalized->getStepRecurrence(SE); in expandAddRecExprLiterally()
1097 const SCEV *PostLoopScale = 0; in expandAddRecExprLiterally()
1106 SCEV::FlagAnyWrap)); in expandAddRecExprLiterally()
1144 const SCEV *const OffsetArray[1] = { PostLoopOffset }; in expandAddRecExprLiterally()
1174 SmallVector<const SCEV *, 4> NewOps(S->getNumOperands()); in visitAddRecExpr()
1179 SCEV::FlagAnyWrap)); in visitAddRecExpr()
1195 SmallVector<const SCEV *, 4> NewOps(S->op_begin(), S->op_end()); in visitAddRecExpr()
1198 const SCEV *Rest = SE.getAddRecExpr(NewOps, L, SCEV::FlagAnyWrap); in visitAddRecExpr()
1202 const SCEV *Base = S->getStart(); in visitAddRecExpr()
1203 const SCEV *RestArray[1] = { Rest }; in visitAddRecExpr()
1274 const SCEV *IH = SE.getUnknown(CanonicalIV); // Get I as a "symbolic" SCEV. in visitAddRecExpr()
1277 const SCEV *NewS = S; in visitAddRecExpr()
1278 const SCEV *Ext = SE.getNoopOrAnyExtend(S, CanonicalIV->getType()); in visitAddRecExpr()
1282 const SCEV *V = cast<SCEVAddRecExpr>(NewS)->evaluateAtIteration(IH, SE); in visitAddRecExpr()
1286 const SCEV *T = SE.getTruncateOrNoop(V, Ty); in visitAddRecExpr()
1365 Value *SCEVExpander::expandCodeFor(const SCEV *SH, Type *Ty, in expandCodeFor()
1374 Value *SCEVExpander::expandCodeFor(const SCEV *SH, Type *Ty) { in expandCodeFor()
1385 Value *SCEVExpander::expand(const SCEV *S) { in expand()
1407 std::map<std::pair<const SCEV *, Instruction *>, in expand()
1468 const SCEV *H = SE.getAddRecExpr(SE.getConstant(Ty, 0), in getOrInsertCanonicalInductionVariable()
1469 SE.getConstant(Ty, 1), L, SCEV::FlagAnyWrap); in getOrInsertCanonicalInductionVariable()
1526 DenseMap<const SCEV *, PHINode *> ExprToIVMap; in replaceCongruentIVs()