diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index e7869ed84e3..f3a035117b3 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -1289,7 +1289,7 @@ private: using EdgeExitInfo = std::pair; /// Initialize BackedgeTakenInfo from a list of exact exit counts. - BackedgeTakenInfo(SmallVectorImpl &&ExitCounts, bool Complete, + BackedgeTakenInfo(ArrayRef ExitCounts, bool Complete, const SCEV *MaxCount, bool MaxOrZero); /// Test whether this BackedgeTakenInfo contains any computed information, @@ -1842,15 +1842,15 @@ private: bool NoWrap); /// Get add expr already created or create a new one. - const SCEV *getOrCreateAddExpr(SmallVectorImpl &Ops, + const SCEV *getOrCreateAddExpr(ArrayRef Ops, SCEV::NoWrapFlags Flags); /// Get mul expr already created or create a new one. - const SCEV *getOrCreateMulExpr(SmallVectorImpl &Ops, + const SCEV *getOrCreateMulExpr(ArrayRef Ops, SCEV::NoWrapFlags Flags); // Get addrec expr already created or create a new one. - const SCEV *getOrCreateAddRecExpr(SmallVectorImpl &Ops, + const SCEV *getOrCreateAddRecExpr(ArrayRef Ops, const Loop *L, SCEV::NoWrapFlags Flags); /// Return x if \p Val is f(x) where f is a 1-1 function. diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 1796fd338c1..400db4f6468 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -2294,7 +2294,7 @@ CollectAddOperandsWithScales(DenseMap &M, // can't-overflow flags for the operation if possible. static SCEV::NoWrapFlags StrengthenNoWrapFlags(ScalarEvolution *SE, SCEVTypes Type, - const SmallVectorImpl &Ops, + const ArrayRef Ops, SCEV::NoWrapFlags Flags) { using namespace std::placeholders; @@ -2742,7 +2742,7 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl &Ops, } const SCEV * -ScalarEvolution::getOrCreateAddExpr(SmallVectorImpl &Ops, +ScalarEvolution::getOrCreateAddExpr(ArrayRef Ops, SCEV::NoWrapFlags Flags) { FoldingSetNodeID ID; ID.AddInteger(scAddExpr); @@ -2764,7 +2764,7 @@ ScalarEvolution::getOrCreateAddExpr(SmallVectorImpl &Ops, } const SCEV * -ScalarEvolution::getOrCreateAddRecExpr(SmallVectorImpl &Ops, +ScalarEvolution::getOrCreateAddRecExpr(ArrayRef Ops, const Loop *L, SCEV::NoWrapFlags Flags) { FoldingSetNodeID ID; ID.AddInteger(scAddRecExpr); @@ -2787,7 +2787,7 @@ ScalarEvolution::getOrCreateAddRecExpr(SmallVectorImpl &Ops, } const SCEV * -ScalarEvolution::getOrCreateMulExpr(SmallVectorImpl &Ops, +ScalarEvolution::getOrCreateMulExpr(ArrayRef Ops, SCEV::NoWrapFlags Flags) { FoldingSetNodeID ID; ID.AddInteger(scMulExpr); @@ -6971,8 +6971,8 @@ ScalarEvolution::ExitLimit::ExitLimit(const SCEV *E, const SCEV *M, /// Allocate memory for BackedgeTakenInfo and copy the not-taken count of each /// computable exit into a persistent ExitNotTakenInfo array. ScalarEvolution::BackedgeTakenInfo::BackedgeTakenInfo( - SmallVectorImpl - &&ExitCounts, + ArrayRef + ExitCounts, bool Complete, const SCEV *MaxCount, bool MaxOrZero) : MaxAndComplete(MaxCount, Complete), MaxOrZero(MaxOrZero) { using EdgeExitInfo = ScalarEvolution::BackedgeTakenInfo::EdgeExitInfo;