@@ -857,7 +857,7 @@ static bool hasHugeExpression(ArrayRef<SCEVUse> Ops) {
857857template <typename FoldT, typename IsIdentityT, typename IsAbsorberT>
858858static const SCEV *
859859constantFoldAndGroupOps(ScalarEvolution &SE, LoopInfo &LI, DominatorTree &DT,
860- SmallVectorImpl<const SCEV * > &Ops, FoldT Fold,
860+ SmallVectorImpl<SCEVUse > &Ops, FoldT Fold,
861861 IsIdentityT IsIdentity, IsAbsorberT IsAbsorber) {
862862 const SCEVConstant *Folded = nullptr;
863863 for (unsigned Idx = 0; Idx < Ops.size();) {
@@ -2262,12 +2262,12 @@ SCEVUse ScalarEvolution::getAnyExtendExpr(SCEVUse Op, Type *Ty) {
22622262/// may be exposed. This helps getAddRecExpr short-circuit extra work in
22632263/// the common case where no interesting opportunities are present, and
22642264/// is also used as a check to avoid infinite recursion.
2265- static bool
2266- CollectAddOperandsWithScales(SmallDenseMap<const SCEV *, APInt, 16 > &M ,
2267- SmallVectorImpl<SCEVUse> &NewOps ,
2268- APInt &AccumulatedConstant ,
2269- ArrayRef<SCEVUse> Ops, const APInt &Scale,
2270- ScalarEvolution &SE) {
2265+ static bool CollectAddOperandsWithScales(SmallDenseMap<SCEVUse, APInt, 16> &M,
2266+ SmallVectorImpl<SCEVUse > &NewOps ,
2267+ APInt &AccumulatedConstant ,
2268+ ArrayRef<SCEVUse> Ops ,
2269+ const APInt &Scale,
2270+ ScalarEvolution &SE) {
22712271 bool Interesting = false;
22722272
22732273 // Iterate over the add operands. They are sorted, with constants first.
@@ -8207,7 +8207,7 @@ ScalarEvolution::getSmallConstantTripCount(const Loop *L,
82078207unsigned ScalarEvolution::getSmallConstantMaxTripCount(
82088208 const Loop *L, SmallVectorImpl<const SCEVPredicate *> *Predicates) {
82098209
8210- const auto * MaxExitCount =
8210+ SCEVUse MaxExitCount =
82118211 Predicates ? getPredicatedConstantMaxBackedgeTakenCount(L, *Predicates)
82128212 : getConstantMaxBackedgeTakenCount(L);
82138213 return getConstantTripCount(dyn_cast<SCEVConstant>(MaxExitCount));
@@ -8314,12 +8314,12 @@ SCEVUse ScalarEvolution::getBackedgeTakenCount(const Loop *L,
83148314 llvm_unreachable("Invalid ExitCountKind!");
83158315}
83168316
8317- const SCEV * ScalarEvolution::getPredicatedSymbolicMaxBackedgeTakenCount(
8317+ SCEVUse ScalarEvolution::getPredicatedSymbolicMaxBackedgeTakenCount(
83188318 const Loop *L, SmallVectorImpl<const SCEVPredicate *> &Preds) {
83198319 return getPredicatedBackedgeTakenInfo(L).getSymbolicMax(L, this, &Preds);
83208320}
83218321
8322- const SCEV * ScalarEvolution::getPredicatedConstantMaxBackedgeTakenCount(
8322+ SCEVUse ScalarEvolution::getPredicatedConstantMaxBackedgeTakenCount(
83238323 const Loop *L, SmallVectorImpl<const SCEVPredicate *> &Preds) {
83248324 return getPredicatedBackedgeTakenInfo(L).getConstantMax(this, &Preds);
83258325}
@@ -9220,7 +9220,7 @@ ScalarEvolution::ExitLimit ScalarEvolution::computeExitLimitFromICmp(
92209220 isKnownPositive(AR->getStepRecurrence(*this))) {
92219221 auto Flags = AR->getNoWrapFlags();
92229222 Flags = setFlags(Flags, WrapType);
9223- SmallVector<const SCEV* > Operands{AR->operands()};
9223+ SmallVector<SCEVUse > Operands{AR->operands()};
92249224 Flags = StrengthenNoWrapFlags(this, scAddRecExpr, Operands, Flags);
92259225 setNoWrapFlags(const_cast<SCEVAddRecExpr *>(AR), Flags);
92269226 }
@@ -13782,7 +13782,7 @@ static void PrintLoopInfo(raw_ostream &OS, ScalarEvolution *SE,
1378213782 }
1378313783 Preds.clear();
1378413784
13785- auto * PredConstantMax =
13785+ auto PredConstantMax =
1378613786 SE->getPredicatedConstantMaxBackedgeTakenCount(L, Preds);
1378713787 if (PredConstantMax != ConstantBTC) {
1378813788 assert(!Preds.empty() &&
@@ -13802,7 +13802,7 @@ static void PrintLoopInfo(raw_ostream &OS, ScalarEvolution *SE,
1380213802 }
1380313803 Preds.clear();
1380413804
13805- auto * PredSymbolicMax =
13805+ auto PredSymbolicMax =
1380613806 SE->getPredicatedSymbolicMaxBackedgeTakenCount(L, Preds);
1380713807 if (SymbolicBTC != PredSymbolicMax) {
1380813808 assert(!Preds.empty() &&
0 commit comments