Home | History | Annotate | Download | only in Scalar

Lines Matching refs:SCEV

59 // implement a strong expression equivalence checker in SCEV. Until then, we
110 Value *LinearFunctionTestReplace(Loop *L, const SCEV *BackedgeTakenCount,
132 /// isValidRewrite - Return true if the SCEV expansion generated by the
133 /// rewriter can replace the original value. SCEV guarantees that it
137 // If an SCEV expression subsumed multiple pointers, its expansion could
141 // could fail in a dangerous way. Ultimately, SCEV will be improved to avoid
146 // because it understands lcssa phis while SCEV does not.
160 // SCEV may have rewritten an expression that produces the GEP's pointer
163 // base of a recurrence. This handles the case in which SCEV expansion
171 const SCEV *FromBase = SE->getPointerBase(SE->getSCEV(FromPtr));
172 const SCEV *ToBase = SE->getPointerBase(SE->getSCEV(ToPtr));
442 // the SCEV routines.
503 // SCEV only supports integer expressions for now.
534 const SCEV *ExitValue = SE->getSCEVAtScope(Inst, L->getParentLoop());
603 WideIVVisitor(PHINode *NarrowIV, ScalarEvolution *SCEV,
605 SE(SCEV), TD(TData) { WI.NarrowIV = NarrowIV; }
675 const SCEV *WideIncExpr;
788 /// operands. Generate the SCEV value for the widened operation without
801 const SCEV *ExtendOperExpr = 0;
816 // the same SCEV expression, and it would be incorrect to transfer NSW/NUW
828 /// extend be safely hoisted out of the loop with SCEV reducing the value to a
835 const SCEV *NarrowExpr = SE->getSCEV(NarrowUse);
843 const SCEV *WideExpr = IsSigned ?
916 "SCEV is not expected to evaluate a block terminator");
968 /// invalidating SCEV expressions.
977 const SCEV *WideIVExpr = IsSigned ?
1041 // Simplification of IV users based on SCEV evaluation.
1066 // forces SCEV to set no-wrap flags before evaluating sign/zero
1067 // extension. The first time SCEV attempts to normalize sign/zero extension,
1070 // other SCEV based analysis prior to SimplifyAndExtend.
1101 static bool isHighCostExpansion(const SCEV *S, BranchInst *BI,
1102 SmallPtrSet<const SCEV*, 8> &Processed,
1115 const SCEV *R = SE->getSCEV(OrigCond->getOperand(1));
1118 const SCEV *L = SE->getSCEV(OrigCond->getOperand(0));
1142 // If we haven't recognized an expensive SCEV pattern, assume it's an
1161 const SCEV *BackedgeTakenCount = SE->getBackedgeTakenCount(L);
1174 SmallPtrSet<const SCEV*, 8> Processed;
1284 /// expression as far as SCEV is concerned.
1288 /// FIXME: Accept non-unit stride as long as SCEV can reduce BECount * Stride.
1289 /// This is difficult in general for SCEV because of potential overflow. But we
1292 FindLoopCounter(Loop *L, const SCEV *BECount,
1301 const SCEV *BestInit = 0;
1325 const SCEV *Step = dyn_cast<SCEVConstant>(AR->getStepRecurrence(*SE));
1334 const SCEV *Init = AR->getStart();
1361 static Value *genLoopLimit(PHINode *IndVar, const SCEV *IVCount, Loop *L,
1365 const SCEV *IVInit = AR->getStart();
1375 const SCEV *IVOffset = SE->getTruncateOrSignExtend(IVCount, OfsTy);
1396 // comparing. This may result in SCEV expension of pointers, but in practice
1397 // SCEV will fold the pointer arithmetic away as such:
1405 const SCEV *IVLimit = 0;
1412 const SCEV *IVInit = AR->getStart();
1428 // SCEV expression (IVInit) for a pointer type IV value (IndVar).
1438 /// SCEV analysis can determine a loop-invariant trip count of the loop, which
1442 const SCEV *BackedgeTakenCount,
1451 const SCEV *IVCount = BackedgeTakenCount;
1461 const SCEV *N =
1466 const SCEV *Zero = SE->getConstant(IVCount->getType(), 0);
1646 const SCEV *BackedgeTakenCount = SE->getBackedgeTakenCount(L);
1656 // Simplification works best when run before other consumers of SCEV. We
1658 // other expressions involving loop IVs have been evaluated. This helps SCEV
1680 // Check preconditions for proper SCEVExpander operation. SCEV does not
1686 // FIXME: SCEV expansion has no way to bail out, so the caller must
1687 // explicitly check any assumptions made by SCEV. Brittle.
1718 // Verify that LFTR, and any other change have not interfered with SCEV's
1723 const SCEV *NewBECount = SE->getBackedgeTakenCount(L);
1731 assert(BackedgeTakenCount == NewBECount && "indvars must preserve SCEV");