Lines Matching refs:Terms
735 // Bail out when the Numerator is not divisible by one of the terms of
2829 // that there's a factor provided by one of the other terms. We need to
8854 // terms of figuring out when zero is crossed, instead of when
8957 SmallVectorImpl<const SCEV *> &Terms;
8960 : Terms(T) {}
8965 Terms.push_back(S);
9012 SmallVectorImpl<const SCEV *> &Terms;
9016 : Terms(T), SE(SE) {}
9038 Terms.push_back(SE.getMulExpr(Operands));
9050 /// Find parametric terms in this SCEVAddRecExpr. We first for parameters in
9055 SmallVectorImpl<const SCEV *> &Terms) {
9067 SCEVCollectTerms TermCollector(Terms);
9072 dbgs() << "Terms:\n";
9073 for (const SCEV *T : Terms)
9077 SCEVCollectAddRecMultiplies MulCollector(Terms, *this);
9082 SmallVectorImpl<const SCEV *> &Terms,
9084 int Last = Terms.size() - 1;
9085 const SCEV *Step = Terms[Last];
9102 for (const SCEV *&Term : Terms) {
9103 // Normalize the terms before the next call to findArrayDimensionsRec.
9107 // Bail out when GCD does not evenly divide one of the terms.
9115 Terms.erase(std::remove_if(Terms.begin(), Terms.end(), [](const SCEV *E) {
9118 Terms.end());
9120 if (Terms.size() > 0)
9121 if (!findArrayDimensionsRec(SE, Terms, Sizes))
9157 // Returns true when one of the SCEVs of Terms contains a SCEVUnknown parameter.
9159 containsParameters(SmallVectorImpl<const SCEV *> &Terms) {
9160 for (const SCEV *T : Terms)
9166 // Return the number of product terms in S.
9206 void ScalarEvolution::findArrayDimensions(SmallVectorImpl<const SCEV *> &Terms,
9209 if (Terms.size() < 1 || !ElementSize)
9212 // Early return when Terms do not contain parameters: we do not delinearize
9214 if (!containsParameters(Terms))
9218 dbgs() << "Terms:\n";
9219 for (const SCEV *T : Terms)
9224 std::sort(Terms.begin(), Terms.end());
9225 Terms.erase(std::unique(Terms.begin(), Terms.end()), Terms.end());
9227 // Put larger terms first.
9228 std::sort(Terms.begin(), Terms.end(), [](const SCEV *LHS, const SCEV *RHS) {
9234 // Try to divide all terms by the element size. If term is not divisible by
9236 for (const SCEV *&Term : Terms) {
9246 for (const SCEV *T : Terms)
9251 dbgs() << "Terms after sorting:\n";
9384 // First step: collect parametric terms.
9385 SmallVector<const SCEV *, 4> Terms;
9386 collectParametricTerms(Expr, Terms);
9388 if (Terms.empty())
9392 findArrayDimensions(Terms, Sizes, ElementSize);