reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/Analysis/ScalarEvolutionExpressions.h
  173     Type *getType() const { return getOperand(0)->getType(); }
  234       return getOperand(getNumOperands() - 1)->getType();
  314       if (isAffine()) return getOperand(1);
lib/Analysis/DependenceAnalysis.cpp
 1054             SE->isKnownNonNegative(AddRec->getOperand(1)))
 2305     if (const auto *Constant = dyn_cast<SCEVConstant>(Product->getOperand(0)))
 2381       const SCEV *Operand = Sum->getOperand(Op);
lib/Analysis/ScalarEvolution.cpp
  266     OS << "{" << *AR->getOperand(0);
  268       OS << ",+," << *AR->getOperand(i);
  406   const SCEVConstant *SC = dyn_cast<SCEVConstant>(Mul->getOperand(0));
  722                                     LA->getOperand(i), RA->getOperand(i), DT,
  722                                     LA->getOperand(i), RA->getOperand(i), DT,
  747                                     LC->getOperand(i), RC->getOperand(i), DT,
  747                                     LC->getOperand(i), RC->getOperand(i), DT,
 1245     Result = SE.getAddExpr(Result, SE.getMulExpr(getOperand(i), Coeff));
 1304       const SCEV *S = getTruncateExpr(CommOp->getOperand(i), Ty, Depth + 1);
 1305       if (!isa<SCEVCastExpr>(CommOp->getOperand(i)) && isa<SCEVTruncateExpr>(S))
 1613     TZ = std::min(TZ, SE.GetMinTrailingZeros(WholeAddExpr->getOperand(I)));
 1881     if (const auto *SC = dyn_cast<SCEVConstant>(SA->getOperand(0))) {
 1919       if (auto *MulLHS = dyn_cast<SCEVConstant>(SM->getOperand(0)))
 1921           if (auto *TruncRHS = dyn_cast<SCEVTruncateExpr>(SM->getOperand(1))) {
 2014     if (const auto *SC = dyn_cast<SCEVConstant>(SA->getOperand(0))) {
 2290     if (Mul && isa<SCEVConstant>(Mul->getOperand(0))) {
 2292           Scale * cast<SCEVConstant>(Mul->getOperand(0))->getAPInt();
 2293       if (Mul->getNumOperands() == 2 && isa<SCEVAddExpr>(Mul->getOperand(1))) {
 2295         const SCEVAddExpr *Add = cast<SCEVAddExpr>(Mul->getOperand(1));
 2487       const auto *LastOp = Mul->getOperand(Mul->getNumOperands() - 1);
 2511                 dyn_cast<SCEVTruncateExpr>(M->getOperand(j))) {
 2517           } else if (const auto *C = dyn_cast<SCEVConstant>(M->getOperand(j))) {
 2615       const SCEV *MulOpSCEV = Mul->getOperand(MulOp);
 2621           const SCEV *InnerMul = Mul->getOperand(MulOp == 0);
 2655           if (OtherMul->getOperand(OMulOp) == MulOpSCEV) {
 2657             const SCEV *InnerMul1 = Mul->getOperand(MulOp == 0);
 2664             const SCEV *InnerMul2 = OtherMul->getOperand(OMulOp == 0);
 2764                   AddRecOps[i], OtherAddRec->getOperand(i)};
 2944           return getAddExpr(getMulExpr(LHSC, Add->getOperand(0),
 2946                             getMulExpr(LHSC, Add->getOperand(1),
 3051         NewOps.push_back(getMulExpr(Scale, AddRec->getOperand(i),
 3123             const SCEV *Term1 = AddRec->getOperand(y-z);
 3124             const SCEV *Term2 = OtherAddRec->getOperand(z);
 3252             const SCEV *Op = M->getOperand(i);
 3285             const SCEV *Op = getUDivExpr(A->getOperand(i), RHS);
 3287                 getMulExpr(Op, RHS) != A->getOperand(i))
 3350     if (const auto *LHSCst = dyn_cast<SCEVConstant>(Mul->getOperand(0))) {
 3379     if (Mul->getOperand(i) == RHS) {
 3832   auto *ConstOp = dyn_cast<SCEVConstant>(Add->getOperand(0));
 3836   return {Add->getOperand(1), ConstOp->getValue()};
 3962       !Add->getOperand(0)->isAllOnesValue())
 3965   const SCEVMulExpr *AddRHS = dyn_cast<SCEVMulExpr>(Add->getOperand(1));
 3967       !AddRHS->getOperand(0)->isAllOnesValue())
 3970   return AddRHS->getOperand(1);
 4733              isSimpleCastedPHI(Add->getOperand(i), SymbolicPHI, Signed, *this)))
 4746       Ops.push_back(Add->getOperand(i));
 5057       if (Add->getOperand(i) == SymbolicName)
 5068           Ops.push_back(SCEVBackedgeConditionFolder::rewrite(Add->getOperand(i),
 5462     uint32_t MinOpRes = GetMinTrailingZeros(A->getOperand(0));
 5464       MinOpRes = std::min(MinOpRes, GetMinTrailingZeros(A->getOperand(i)));
 5470     uint32_t SumOpRes = GetMinTrailingZeros(M->getOperand(0));
 5475           std::min(SumOpRes + GetMinTrailingZeros(M->getOperand(i)), BitWidth);
 5481     uint32_t MinOpRes = GetMinTrailingZeros(A->getOperand(0));
 5483       MinOpRes = std::min(MinOpRes, GetMinTrailingZeros(A->getOperand(i)));
 5489     uint32_t MinOpRes = GetMinTrailingZeros(M->getOperand(0));
 5491       MinOpRes = std::min(MinOpRes, GetMinTrailingZeros(M->getOperand(i)));
 5497     uint32_t MinOpRes = GetMinTrailingZeros(M->getOperand(0));
 5499       MinOpRes = std::min(MinOpRes, GetMinTrailingZeros(M->getOperand(i)));
 5572     ConstantRange X = getRangeRef(Add->getOperand(0), SignHint);
 5574       X = X.add(getRangeRef(Add->getOperand(i), SignHint));
 5580     ConstantRange X = getRangeRef(Mul->getOperand(0), SignHint);
 5582       X = X.multiply(getRangeRef(Mul->getOperand(i), SignHint));
 5588     ConstantRange X = getRangeRef(SMax->getOperand(0), SignHint);
 5590       X = X.smax(getRangeRef(SMax->getOperand(i), SignHint));
 5596     ConstantRange X = getRangeRef(UMax->getOperand(0), SignHint);
 5598       X = X.umax(getRangeRef(UMax->getOperand(i), SignHint));
 5604     ConstantRange X = getRangeRef(SMin->getOperand(0), SignHint);
 5606       X = X.smin(getRangeRef(SMin->getOperand(i), SignHint));
 5612     ConstantRange X = getRangeRef(UMin->getOperand(0), SignHint);
 5614       X = X.umin(getRangeRef(UMin->getOperand(i), SignHint));
 5662         if (!isKnownNonNegative(AddRec->getOperand(i))) AllNonNeg = false;
 5663         if (!isKnownNonPositive(AddRec->getOperand(i))) AllNonPos = false;
 5875         if (SA->getNumOperands() != 2 || !isa<SCEVConstant>(SA->getOperand(0)))
 5878         Offset = cast<SCEVConstant>(SA->getOperand(0))->getAPInt();
 5879         S = SA->getOperand(1);
 6274             if (auto *OpC = dyn_cast<SCEVConstant>(LHSMul->getOperand(0))) {
 7538       !isa<SCEVConstant>(IdxExpr->getOperand(0)) ||
 7539       !isa<SCEVConstant>(IdxExpr->getOperand(1)))
 8077       if (Constant *C = BuildConstantFromSCEV(SA->getOperand(0))) {
 8084           Constant *C2 = BuildConstantFromSCEV(SA->getOperand(i));
 8116       if (Constant *C = BuildConstantFromSCEV(SM->getOperand(0))) {
 8120           Constant *C2 = BuildConstantFromSCEV(SM->getOperand(i));
 8270       const SCEV *OpAtScope = getSCEVAtScope(Comm->getOperand(i), L);
 8271       if (OpAtScope != Comm->getOperand(i)) {
 8279           OpAtScope = getSCEVAtScope(Comm->getOperand(i), L);
 8310       const SCEV *OpAtScope = getSCEVAtScope(AddRec->getOperand(i), L);
 8311       if (OpAtScope == AddRec->getOperand(i))
 8320         NewOps.push_back(getSCEVAtScope(AddRec->getOperand(i), L));
 8444   const SCEVConstant *LC = dyn_cast<SCEVConstant>(AddRec->getOperand(0));
 8445   const SCEVConstant *MC = dyn_cast<SCEVConstant>(AddRec->getOperand(1));
 8446   const SCEVConstant *NC = dyn_cast<SCEVConstant>(AddRec->getOperand(2));
 8576   assert(AddRec->getOperand(0)->isZero() &&
 8760   const SCEV *Step = getSCEVAtScope(AddRec->getOperand(1), L->getParentLoop());
 8973                     dyn_cast<SCEVMulExpr>(AE->getOperand(0)))
 8975                   ME->getOperand(0)->isAllOnesValue()) {
 8976                 RHS = AE->getOperand(1);
 8977                 LHS = ME->getOperand(1);
 9862   L = AE->getOperand(0);
 9863   R = AE->getOperand(1);
10266     auto *LL = LHSAddExpr->getOperand(0);
10267     auto *LR = LHSAddExpr->getOperand(1);
10837     APInt A = cast<SCEVConstant>(getOperand(1))->getAPInt();
10880     Ops.push_back(SE.getAddExpr(getOperand(i), getOperand(i + 1)));
10880     Ops.push_back(SE.getAddExpr(getOperand(i), getOperand(i + 1)));
10885   const SCEV *Last = getOperand(getNumOperands() - 1);
12519   const SCEV *A = Add->getOperand(1);
12520   const auto *Mul = dyn_cast<SCEVMulExpr>(Add->getOperand(0));
12536   if (Mul->getNumOperands() == 3 && isa<SCEVConstant>(Mul->getOperand(0)))
12537     return MatchURemWithDivisor(Mul->getOperand(1)) ||
12538            MatchURemWithDivisor(Mul->getOperand(2));
12542     return MatchURemWithDivisor(Mul->getOperand(1)) ||
12543            MatchURemWithDivisor(Mul->getOperand(0)) ||
12544            MatchURemWithDivisor(getNegativeSCEV(Mul->getOperand(1))) ||
12545            MatchURemWithDivisor(getNegativeSCEV(Mul->getOperand(0)));
lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
  106     const SCEV *Last = A->getOperand(A->getNumOperands() - 1);
lib/Analysis/ScalarEvolutionExpander.cpp
  284     if (const SCEVConstant *C = dyn_cast<SCEVConstant>(M->getOperand(0)))
  886     Base = A->getOperand(A->getNumOperands()-1);
 1596   if (S->isAffine() && S->getOperand(1)->isOne()) {
 1610                       SE.getNoopOrAnyExtend(S->getOperand(1),
 1662   Value *LHS = expand(S->getOperand(S->getNumOperands()-1));
 1667     Type *OpTy = S->getOperand(i)->getType();
 1672     Value *RHS = expandCodeFor(S->getOperand(i), Ty);
 1687   Value *LHS = expand(S->getOperand(S->getNumOperands()-1));
 1692     Type *OpTy = S->getOperand(i)->getType();
 1697     Value *RHS = expandCodeFor(S->getOperand(i), Ty);
 1712   Value *LHS = expand(S->getOperand(S->getNumOperands() - 1));
 1717     Type *OpTy = S->getOperand(i)->getType();
 1722     Value *RHS = expandCodeFor(S->getOperand(i), Ty);
 1737   Value *LHS = expand(S->getOperand(S->getNumOperands() - 1));
 1742     Type *OpTy = S->getOperand(i)->getType();
 1747     Value *RHS = expandCodeFor(S->getOperand(i), Ty);
lib/Analysis/VectorUtils.cpp
  218       if (M->getOperand(0)->getSCEVType() != scConstant)
  221       const APInt &APStepVal = cast<SCEVConstant>(M->getOperand(0))->getAPInt();
  230       V = M->getOperand(1);
lib/Target/ARM/MVETailPredication.cpp
  328     if (auto *Const = dyn_cast<SCEVConstant>(S->getOperand(0))) {
  333     return dyn_cast<SCEVMulExpr>(S->getOperand(1));
  337     if (auto *Const = dyn_cast<SCEVConstant>(S->getOperand(0))) {
  342     return dyn_cast<SCEVUDivExpr>(S->getOperand(1));
  353       if (auto *Const = dyn_cast<SCEVConstant>(RoundUp->getOperand(0))) {
  359       return RoundUp->getOperand(1);
  374     if (auto *Div = dyn_cast<SCEVUDivExpr>(TC->getOperand(1)))
lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
 1908   if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(S->getOperand(1)))
 1956   if (StoreEv->getOperand(1) != LoadEv->getOperand(1))
 1956   if (StoreEv->getOperand(1) != LoadEv->getOperand(1))
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  423   const SCEVConstant *ConstStride = cast<SCEVConstant>(StoreEv->getOperand(1));
  506   if (!isa<SCEVConstant>(StoreEv->getOperand(1)))
  565     if (StoreEv->getOperand(1) != LoadEv->getOperand(1))
  565     if (StoreEv->getOperand(1) != LoadEv->getOperand(1))
  832   const SCEVConstant *ConstStride = dyn_cast<SCEVConstant>(Ev->getOperand(1));
lib/Transforms/Scalar/LoopStrengthReduce.cpp
  420     if (Mul->getOperand(0)->isAllOnesValue()) {
  936       if (isa<SCEVConstant>(Mul->getOperand(0)))
  937         return isHighCostExpansion(Mul->getOperand(1), Processed, SE);
  941       if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(Mul->getOperand(1))) {
 1285     if (!AR->isAffine() || !isa<SCEVConstant>(AR->getOperand(1))) {
 1286       if (!Regs.count(AR->getOperand(1))) {
 1287         RateRegister(F, AR->getOperand(1), Regs);
 2289   const SCEV *MaxLHS = Max->getOperand(0);
 2290   const SCEV *MaxRHS = Max->getOperand(1);
 3529         dyn_cast<SCEVConstant>(Mul->getOperand(0))) {
 3532         CollectSubexprs(Mul->getOperand(1), C, Ops, L, SE, Depth+1);
tools/polly/lib/Analysis/ScopDetection.cpp
  836     if ((Expr->getNumOperands() == 2) && Expr->getOperand(0)->isZero()) {
  837       auto Res = visit(Expr->getOperand(1));
tools/polly/lib/Support/SCEVAffinator.cpp
  364   PWACtx Sum = visit(Expr->getOperand(0));
  367     Sum = combine(Sum, visit(Expr->getOperand(i)), isl_pw_aff_add);
  376   PWACtx Prod = visit(Expr->getOperand(0));
  379     Prod = combine(Prod, visit(Expr->getOperand(i)), isl_pw_aff_mul);
  397     PWACtx Step = visit(Expr->getOperand(1));
  427   PWACtx Max = visit(Expr->getOperand(0));
  430     Max = combine(Max, visit(Expr->getOperand(i)), isl_pw_aff_max);
  439   PWACtx Min = visit(Expr->getOperand(0));
  442     Min = combine(Min, visit(Expr->getOperand(i)), isl_pw_aff_min);
tools/polly/lib/Support/SCEVValidator.cpp
  180       ValidatorResult Op = visit(Expr->getOperand(i));
  197       ValidatorResult Op = visit(Expr->getOperand(i));
  212                    << "\tNext operand (" << Op << "): " << *Expr->getOperand(i)
  286       ValidatorResult Op = visit(Expr->getOperand(i));
  301       ValidatorResult Op = visit(Expr->getOperand(i));
  316       ValidatorResult Op = visit(Expr->getOperand(i));
  331       ValidatorResult Op = visit(Expr->getOperand(i));
  734     auto Op0Pair = extractConstantFactor(Add->getOperand(0), SE);
  744       auto OpUPair = extractConstantFactor(Add->getOperand(u), SE);
unittests/Analysis/ScalarEvolutionTest.cpp
   95   EXPECT_EQ(cast<SCEVConstant>(M0->getOperand(0))->getValue()->getZExtValue(),
   97   EXPECT_EQ(cast<SCEVConstant>(M1->getOperand(0))->getValue()->getZExtValue(),
   99   EXPECT_EQ(cast<SCEVConstant>(M2->getOperand(0))->getValue()->getZExtValue(),
  103   EXPECT_EQ(cast<SCEVUnknown>(M0->getOperand(1))->getValue(), V0);
  104   EXPECT_EQ(cast<SCEVUnknown>(M1->getOperand(1))->getValue(), V1);
  105   EXPECT_EQ(cast<SCEVUnknown>(M2->getOperand(1))->getValue(), V2);
  112   EXPECT_EQ(cast<SCEVUnknown>(M0->getOperand(1))->getValue(), V0);
  113   EXPECT_EQ(cast<SCEVUnknown>(M1->getOperand(1))->getValue(), V0);
  114   EXPECT_EQ(cast<SCEVUnknown>(M2->getOperand(1))->getValue(), V0);
  196       Exp.expandCodeFor(cast<SCEVAddExpr>(S)->getOperand(1), nullptr, Br);