[llvm] r352466 - [NFC] Use ArrayRef instead of SmallVectorImpl where possible
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 29 01:39:15 PST 2019
Author: mkazantsev
Date: Tue Jan 29 01:39:15 2019
New Revision: 352466
URL: http://llvm.org/viewvc/llvm-project?rev=352466&view=rev
Log:
[NFC] Use ArrayRef instead of SmallVectorImpl where possible
Modified:
llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=352466&r1=352465&r2=352466&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Tue Jan 29 01:39:15 2019
@@ -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.
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=352466&r1=352465&r2=352466&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Tue Jan 29 01:39:15 2019
@@ -2294,7 +2294,7 @@ CollectAddOperandsWithScales(DenseMap<co
// 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(
}
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(Smal
}
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(S
}
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(co
/// 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;
More information about the llvm-commits
mailing list