Lines Matching refs:Terms
531 /// Compare the two values \p LV and \p RV in terms of their "complexity" where
893 // Bail out when the Numerator is not divisible by one of the terms of
3295 // that there's a factor provided by one of the other terms. We need to
10571 // terms of figuring out when zero is crossed, instead of when
10676 SmallVectorImpl<const SCEV *> &Terms;
10678 SCEVCollectTerms(SmallVectorImpl<const SCEV *> &T) : Terms(T) {}
10684 Terms.push_back(S);
10733 SmallVectorImpl<const SCEV *> &Terms;
10737 : Terms(T), SE(SE) {}
10762 Terms.push_back(SE.getMulExpr(Operands));
10776 /// Find parametric terms in this SCEVAddRecExpr. We first for parameters in
10781 SmallVectorImpl<const SCEV *> &Terms) {
10793 SCEVCollectTerms TermCollector(Terms);
10798 dbgs() << "Terms:\n";
10799 for (const SCEV *T : Terms)
10803 SCEVCollectAddRecMultiplies MulCollector(Terms, *this);
10808 SmallVectorImpl<const SCEV *> &Terms,
10810 int Last = Terms.size() - 1;
10811 Terms[Last];
10828 for (const SCEV *&Term : Terms) {
10829 // Normalize the terms before the next call to findArrayDimensionsRec.
10833 // Bail out when GCD does not evenly divide one of the terms.
10841 Terms.erase(
10842 remove_if(Terms, [](const SCEV *E) { return isa<SCEVConstant>(E); }),
10843 Terms.end());
10845 if (Terms.size() > 0)
10846 if (!findArrayDimensionsRec(SE, Terms, Sizes))
10853 // Returns true when one of the SCEVs of Terms contains a SCEVUnknown parameter.
10854 static inline bool containsParameters(SmallVectorImpl<const SCEV *> &Terms) {
10855 for (const SCEV *T : Terms)
10861 // Return the number of product terms in S.
10901 void ScalarEvolution::findArrayDimensions(SmallVectorImpl<const SCEV *> &Terms,
10904 if (Terms.size() < 1 || !ElementSize)
10907 // Early return when Terms do not contain parameters: we do not delinearize
10909 if (!containsParameters(Terms))
10913 dbgs() << "Terms:\n";
10914 for (const SCEV *T : Terms)
10919 array_pod_sort(Terms.begin(), Terms.end());
10920 Terms.erase(std::unique(Terms.begin(), Terms.end()), Terms.end());
10922 // Put larger terms first.
10923 llvm::sort(Terms.begin(), Terms.end(), [](const SCEV *LHS, const SCEV *RHS) {
10927 // Try to divide all terms by the element size. If term is not divisible by
10929 for (const SCEV *&Term : Terms) {
10939 for (const SCEV *T : Terms)
10944 dbgs() << "Terms after sorting:\n";
11074 // First step: collect parametric terms.
11075 SmallVector<const SCEV *, 4> Terms;
11076 collectParametricTerms(Expr, Terms);
11078 if (Terms.empty())
11082 findArrayDimensions(Terms, Sizes, ElementSize);