Home | History | Annotate | Download | only in Scalar

Lines Matching refs:Rewriter

104   void simplifyAndExtend(Loop *L, SCEVExpander &Rewriter, LoopInfo *LI);
107 void rewriteLoopExitValues(Loop *L, SCEVExpander &Rewriter);
111 PHINode *IndVar, SCEVExpander &Rewriter);
115 Value *expandSCEVIfNeeded(SCEVExpander &Rewriter, const SCEV *S, Loop *L,
128 /// Return true if the SCEV expansion generated by the rewriter can replace the
479 Value *IndVarSimplify::expandSCEVIfNeeded(SCEVExpander &Rewriter, const SCEV *S,
484 if (Value *ExistingValue = Rewriter.findExistingExpansion(S, InsertPt, L))
489 return Rewriter.expandCodeFor(S, ResultTy, InsertPt);
507 void IndVarSimplify::rewriteLoopExitValues(Loop *L, SCEVExpander &Rewriter) {
606 bool HighCost = Rewriter.isHighCostExpansion(ExitValue, L, Inst);
608 expandSCEVIfNeeded(Rewriter, ExitValue, L, Inst, PN->getType());
657 // so that the rewriter doesn't trip over it later.
658 Rewriter.clearInsertPoint();
910 PHINode *createWideIV(SCEVExpander &Rewriter);
928 Instruction *widenIVUse(NarrowIVDefUse DU, SCEVExpander &Rewriter);
1252 Instruction *WidenIV::widenIVUse(NarrowIVDefUse DU, SCEVExpander &Rewriter) {
1346 if (WideAddRec == WideIncExpr && Rewriter.hoistIVInc(WideInc, DU.NarrowUse))
1396 PHINode *WidenIV::createWideIV(SCEVExpander &Rewriter) {
1423 // The rewriter provides a value for the desired IV expression. This may
1428 WidePhi = cast<PHINode>(Rewriter.expandCodeFor(AddRec, WideType, InsertPt));
1454 Instruction *WideUse = widenIVUse(DU, Rewriter);
1505 SCEVExpander &Rewriter,
1539 if (PHINode *WidePhi = Widener.createWideIV(Rewriter)) {
1565 SCEVExpander &Rewriter) {
1578 if (Rewriter.isHighCostExpansion(BackedgeTakenCount, L))
1827 SCEVExpander &Rewriter, ScalarEvolution *SE) {
1850 Value *GEPOffset = Rewriter.expandCodeFor(IVOffset, OfsTy, BI);
1901 return Rewriter.expandCodeFor(IVLimit, LimitTy, BI);
1914 SCEVExpander &Rewriter) {
1915 assert(canExpandBackedgeTakenCount(L, SE, Rewriter) && "precondition");
1936 Value *ExitCnt = genLoopLimit(IndVar, IVCount, L, Rewriter, SE);
2120 // Create a rewriter object which we'll use to transform the code with.
2121 SCEVExpander Rewriter(*SE, DL, "indvars");
2123 Rewriter.setDebugType(DEBUG_TYPE);
2132 Rewriter.disableCanonicalMode();
2133 simplifyAndExtend(L, Rewriter, LI);
2143 rewriteLoopExitValues(L, Rewriter);
2146 NumElimIV += Rewriter.replaceCongruentIVs(L, DT, DeadInsts);
2150 if (canExpandBackedgeTakenCount(L, SE, Rewriter) && needsLFTR(L, DT)) {
2164 Rewriter);
2167 // Clear the rewriter cache, because values that are in the rewriter's cache
2170 Rewriter.clear();
2179 // The Rewriter may not be used from this point on.