Lines Matching full:terms
66 SmallVectorImpl<const SCEV *> &Terms;
68 SCEVCollectTerms(SmallVectorImpl<const SCEV *> &T) : Terms(T) {}
74 Terms.push_back(S);
123 SmallVectorImpl<const SCEV *> &Terms;
128 : Terms(T), SE(SE) {}
153 Terms.push_back(SE.getMulExpr(Operands));
167 /// Find parametric terms in this SCEVAddRecExpr. We first for parameters in
172 SmallVectorImpl<const SCEV *> &Terms) {
184 SCEVCollectTerms TermCollector(Terms);
189 dbgs() << "Terms:\n";
190 for (const SCEV *T : Terms)
194 SCEVCollectAddRecMultiplies MulCollector(Terms, SE);
199 SmallVectorImpl<const SCEV *> &Terms,
201 int Last = Terms.size() - 1;
202 const SCEV *Step = Terms[Last];
219 for (const SCEV *&Term : Terms) {
220 // Normalize the terms before the next call to findArrayDimensionsRec.
224 // Bail out when GCD does not evenly divide one of the terms.
232 erase_if(Terms, [](const SCEV *E) { return isa<SCEVConstant>(E); });
234 if (Terms.size() > 0)
235 if (!findArrayDimensionsRec(SE, Terms, Sizes))
242 // Returns true when one of the SCEVs of Terms contains a SCEVUnknown parameter.
243 static inline bool containsParameters(SmallVectorImpl<const SCEV *> &Terms) {
244 for (const SCEV *T : Terms)
251 // Return the number of product terms in S.
278 SmallVectorImpl<const SCEV *> &Terms,
281 if (Terms.size() < 1 || !ElementSize)
284 // Early return when Terms do not contain parameters: we do not delinearize
286 if (!containsParameters(Terms))
290 dbgs() << "Terms:\n";
291 for (const SCEV *T : Terms)
296 array_pod_sort(Terms.begin(), Terms.end());
297 Terms.erase(llvm::unique(Terms), Terms.end());
299 // Put larger terms first.
300 llvm::sort(Terms, [](const SCEV *LHS, const SCEV *RHS) {
304 // Try to divide all terms by the element size. If term is not divisible by
306 for (const SCEV *&Term : Terms) {
316 for (const SCEV *T : Terms)
321 dbgs() << "Terms after sorting:\n";
452 // First step: collect parametric terms.
453 SmallVector<const SCEV *, 4> Terms;
454 collectParametricTerms(SE, Expr, Terms);
456 if (Terms.empty())
460 findArrayDimensions(SE, Terms, Sizes, ElementSize);