diff options
author | Max Kazantsev <max.kazantsev@azul.com> | 2019-01-29 09:39:15 +0000 |
---|---|---|
committer | Max Kazantsev <max.kazantsev@azul.com> | 2019-01-29 09:39:15 +0000 |
commit | 23e642248d0713ccf0b257c79083ca856f74b77c (patch) | |
tree | 0bc83c93d51d895e804e0f02c1695be60e78fa77 | |
parent | f5884d255e78305d41c28c6e001a460ff83981d8 (diff) | |
download | bcm5719-llvm-23e642248d0713ccf0b257c79083ca856f74b77c.tar.gz bcm5719-llvm-23e642248d0713ccf0b257c79083ca856f74b77c.zip |
[NFC] Use ArrayRef instead of SmallVectorImpl where possible
llvm-svn: 352466
-rw-r--r-- | llvm/include/llvm/Analysis/ScalarEvolution.h | 8 | ||||
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index e7869ed84e3..f3a035117b3 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/include/llvm/Analysis/ScalarEvolution.h @@ -1289,7 +1289,7 @@ private: using EdgeExitInfo = std::pair<BasicBlock *, ExitLimit>; /// Initialize BackedgeTakenInfo from a list of exact exit counts. - BackedgeTakenInfo(SmallVectorImpl<EdgeExitInfo> &&ExitCounts, bool Complete, + BackedgeTakenInfo(ArrayRef<EdgeExitInfo> 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<const SCEV *> &Ops, + const SCEV *getOrCreateAddExpr(ArrayRef<const SCEV *> Ops, SCEV::NoWrapFlags Flags); /// Get mul expr already created or create a new one. - const SCEV *getOrCreateMulExpr(SmallVectorImpl<const SCEV *> &Ops, + const SCEV *getOrCreateMulExpr(ArrayRef<const SCEV *> Ops, SCEV::NoWrapFlags Flags); // Get addrec expr already created or create a new one. - const SCEV *getOrCreateAddRecExpr(SmallVectorImpl<const SCEV *> &Ops, + const SCEV *getOrCreateAddRecExpr(ArrayRef<const SCEV *> 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/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 1796fd338c1..400db4f6468 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -2294,7 +2294,7 @@ CollectAddOperandsWithScales(DenseMap<const SCEV *, APInt> &M, // can't-overflow flags for the operation if possible. static SCEV::NoWrapFlags StrengthenNoWrapFlags(ScalarEvolution *SE, SCEVTypes Type, - const SmallVectorImpl<const SCEV *> &Ops, + const ArrayRef<const SCEV *> Ops, SCEV::NoWrapFlags Flags) { using namespace std::placeholders; @@ -2742,7 +2742,7 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops, } const SCEV * -ScalarEvolution::getOrCreateAddExpr(SmallVectorImpl<const SCEV *> &Ops, +ScalarEvolution::getOrCreateAddExpr(ArrayRef<const SCEV *> Ops, SCEV::NoWrapFlags Flags) { FoldingSetNodeID ID; ID.AddInteger(scAddExpr); @@ -2764,7 +2764,7 @@ ScalarEvolution::getOrCreateAddExpr(SmallVectorImpl<const SCEV *> &Ops, } const SCEV * -ScalarEvolution::getOrCreateAddRecExpr(SmallVectorImpl<const SCEV *> &Ops, +ScalarEvolution::getOrCreateAddRecExpr(ArrayRef<const SCEV *> Ops, const Loop *L, SCEV::NoWrapFlags Flags) { FoldingSetNodeID ID; ID.AddInteger(scAddRecExpr); @@ -2787,7 +2787,7 @@ ScalarEvolution::getOrCreateAddRecExpr(SmallVectorImpl<const SCEV *> &Ops, } const SCEV * -ScalarEvolution::getOrCreateMulExpr(SmallVectorImpl<const SCEV *> &Ops, +ScalarEvolution::getOrCreateMulExpr(ArrayRef<const SCEV *> 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<ScalarEvolution::BackedgeTakenInfo::EdgeExitInfo> - &&ExitCounts, + ArrayRef<ScalarEvolution::BackedgeTakenInfo::EdgeExitInfo> + ExitCounts, bool Complete, const SCEV *MaxCount, bool MaxOrZero) : MaxAndComplete(MaxCount, Complete), MaxOrZero(MaxOrZero) { using EdgeExitInfo = ScalarEvolution::BackedgeTakenInfo::EdgeExitInfo; |