Lines Matching refs:Numerator
699 static void divide(ScalarEvolution &SE, const SCEV *Numerator, in divide()
702 assert(Numerator && Denominator && "Uninitialized SCEV"); in divide()
704 SCEVDivision D(SE, Numerator, Denominator); in divide()
708 if (Numerator == Denominator) { in divide()
714 if (Numerator->isZero()) { in divide()
722 *Quotient = Numerator; in divide()
730 *Quotient = Numerator; in divide()
739 *Remainder = Numerator; in divide()
747 D.visit(Numerator); in divide()
754 void visitTruncateExpr(const SCEVTruncateExpr *Numerator) {} in visitTruncateExpr()
755 void visitZeroExtendExpr(const SCEVZeroExtendExpr *Numerator) {} in visitZeroExtendExpr()
756 void visitSignExtendExpr(const SCEVSignExtendExpr *Numerator) {} in visitSignExtendExpr()
757 void visitUDivExpr(const SCEVUDivExpr *Numerator) {} in visitUDivExpr()
758 void visitSMaxExpr(const SCEVSMaxExpr *Numerator) {} in visitSMaxExpr()
759 void visitUMaxExpr(const SCEVUMaxExpr *Numerator) {} in visitUMaxExpr()
760 void visitUnknown(const SCEVUnknown *Numerator) {} in visitUnknown()
761 void visitCouldNotCompute(const SCEVCouldNotCompute *Numerator) {} in visitCouldNotCompute()
763 void visitConstant(const SCEVConstant *Numerator) { in visitConstant()
765 APInt NumeratorVal = Numerator->getAPInt(); in visitConstant()
784 void visitAddRecExpr(const SCEVAddRecExpr *Numerator) { in visitAddRecExpr()
786 if (!Numerator->isAffine()) in visitAddRecExpr()
787 return cannotDivide(Numerator); in visitAddRecExpr()
788 divide(SE, Numerator->getStart(), Denominator, &StartQ, &StartR); in visitAddRecExpr()
789 divide(SE, Numerator->getStepRecurrence(SE), Denominator, &StepQ, &StepR); in visitAddRecExpr()
794 return cannotDivide(Numerator); in visitAddRecExpr()
795 Quotient = SE.getAddRecExpr(StartQ, StepQ, Numerator->getLoop(), in visitAddRecExpr()
796 Numerator->getNoWrapFlags()); in visitAddRecExpr()
797 Remainder = SE.getAddRecExpr(StartR, StepR, Numerator->getLoop(), in visitAddRecExpr()
798 Numerator->getNoWrapFlags()); in visitAddRecExpr()
801 void visitAddExpr(const SCEVAddExpr *Numerator) { in visitAddExpr()
805 for (const SCEV *Op : Numerator->operands()) { in visitAddExpr()
811 return cannotDivide(Numerator); in visitAddExpr()
827 void visitMulExpr(const SCEVMulExpr *Numerator) { in visitMulExpr()
832 for (const SCEV *Op : Numerator->operands()) { in visitMulExpr()
835 return cannotDivide(Numerator); in visitMulExpr()
852 return cannotDivide(Numerator); in visitMulExpr()
868 return cannotDivide(Numerator); in visitMulExpr()
874 Remainder = SCEVParameterRewriter::rewrite(Numerator, SE, RewriteMap, true); in visitMulExpr()
881 SCEVParameterRewriter::rewrite(Numerator, SE, RewriteMap, true); in visitMulExpr()
887 const SCEV *Diff = SE.getMinusSCEV(Numerator, Remainder); in visitMulExpr()
889 if (sizeOfSCEV(Diff) > sizeOfSCEV(Numerator)) in visitMulExpr()
890 return cannotDivide(Numerator); in visitMulExpr()
893 return cannotDivide(Numerator); in visitMulExpr()
898 SCEVDivision(ScalarEvolution &S, const SCEV *Numerator, in SCEVDivision()
907 cannotDivide(Numerator); in SCEVDivision()
912 void cannotDivide(const SCEV *Numerator) { in cannotDivide()
914 Remainder = Numerator; in cannotDivide()