Lines Matching refs:Rewriter
108 void SimplifyAndExtend(Loop *L, SCEVExpander &Rewriter, LPPassManager &LPM);
110 void RewriteLoopExitValues(Loop *L, SCEVExpander &Rewriter);
113 PHINode *IndVar, SCEVExpander &Rewriter);
135 /// rewriter can replace the original value. SCEV guarantees that it
477 void IndVarSimplify::RewriteLoopExitValues(Loop *L, SCEVExpander &Rewriter) {
577 Value *ExitVal = Rewriter.expandCodeFor(ExitValue, PN->getType(), Inst);
617 // so that the rewriter doesn't trip over it later.
618 Rewriter.clearInsertPoint();
740 PHINode *CreateWideIV(SCEVExpander &Rewriter);
752 Instruction *WidenIVUse(NarrowIVDefUse DU, SCEVExpander &Rewriter);
895 Instruction *WidenIV::WidenIVUse(NarrowIVDefUse DU, SCEVExpander &Rewriter) {
963 && Rewriter.hoistIVInc(WideInc, DU.NarrowUse))
1011 PHINode *WidenIV::CreateWideIV(SCEVExpander &Rewriter) {
1037 // The rewriter provides a value for the desired IV expression. This may
1042 WidePhi = cast<PHINode>(Rewriter.expandCodeFor(AddRec, WideType, InsertPt));
1068 Instruction *WideUse = WidenIVUse(DU, Rewriter);
1093 SCEVExpander &Rewriter,
1127 if (PHINode *WidePhi = Widener.CreateWideIV(Rewriter)) {
1470 SCEVExpander &Rewriter, ScalarEvolution *SE) {
1489 Value *GEPOffset = Rewriter.expandCodeFor(IVOffset, OfsTy, BI);
1539 return Rewriter.expandCodeFor(IVLimit, LimitTy, BI);
1552 SCEVExpander &Rewriter) {
1574 Value *ExitCnt = genLoopLimit(IndVar, IVCount, L, Rewriter, SE);
1764 // Create a rewriter object which we'll use to transform the code with.
1765 SCEVExpander Rewriter(*SE, "indvars");
1767 Rewriter.setDebugType(DEBUG_TYPE);
1776 Rewriter.disableCanonicalMode();
1777 SimplifyAndExtend(L, Rewriter, LPM);
1786 RewriteLoopExitValues(L, Rewriter);
1789 NumElimIV += Rewriter.replaceCongruentIVs(L, DT, DeadInsts);
1807 Rewriter);
1810 // Clear the rewriter cache, because values that are in the rewriter's cache
1813 Rewriter.clear();
1822 // The Rewriter may not be used from this point on.