diff options
author | Adam Nemet <anemet@apple.com> | 2015-07-30 04:21:13 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2015-07-30 04:21:13 +0000 |
commit | 252d529b6cf1385d942f03cacd2cbda441131522 (patch) | |
tree | 062eed8010051d25e49fd51f6a0022cbb0f590f2 /llvm/lib/Transforms/Utils/LoopVersioning.cpp | |
parent | e0992134816086c5cb653b76f4e597923e400e3f (diff) | |
download | llvm-252d529b6cf1385d942f03cacd2cbda441131522.zip llvm-252d529b6cf1385d942f03cacd2cbda441131522.tar.gz llvm-252d529b6cf1385d942f03cacd2cbda441131522.tar.bz2 |
[LoopVer] Add missing std::move
The reason I was passing this vector by value in the constructor so that
I wouldn't have to copy when initializing the corresponding member but
then I forgot the std::move.
The use-case is LoopDistribution which filters the checks then
std::moves it to LoopVersioning's constructor. With this interface we
can avoid any copies.
llvm-svn: 243616
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopVersioning.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopVersioning.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopVersioning.cpp b/llvm/lib/Transforms/Utils/LoopVersioning.cpp index b2182bd..e4af2e3 100644 --- a/llvm/lib/Transforms/Utils/LoopVersioning.cpp +++ b/llvm/lib/Transforms/Utils/LoopVersioning.cpp @@ -27,7 +27,8 @@ LoopVersioning::LoopVersioning( const LoopAccessInfo &LAI, Loop *L, LoopInfo *LI, DominatorTree *DT, const SmallVector<int, 8> *PtrToPartition) : VersionedLoop(L), NonVersionedLoop(nullptr), - PtrToPartition(PtrToPartition), Checks(Checks), LAI(LAI), LI(LI), DT(DT) { + PtrToPartition(PtrToPartition), Checks(std::move(Checks)), LAI(LAI), + LI(LI), DT(DT) { assert(L->getExitBlock() && "No single exit block"); assert(L->getLoopPreheader() && "No preheader"); } |