diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-08-12 04:32:42 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-08-12 04:32:42 +0000 |
commit | 2d006e767341a2f9ea57a9cb5cea055849a8c684 (patch) | |
tree | 241cd093f21977c1a053ffc326d6619526159c4a /llvm/lib/Analysis/LoopAccessAnalysis.cpp | |
parent | c700490f485f78e1d6d1b6577d17ef76066bcf1f (diff) | |
download | bcm5719-llvm-2d006e767341a2f9ea57a9cb5cea055849a8c684.tar.gz bcm5719-llvm-2d006e767341a2f9ea57a9cb5cea055849a8c684.zip |
Use the range variant of transform instead of unpacking begin/end
No functionality change is intended.
llvm-svn: 278476
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 4ae31627f78..cb0388def5e 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -1434,7 +1434,7 @@ MemoryDepChecker::getInstructionsForAccess(Value *Ptr, bool isWrite) const { auto &IndexVector = Accesses.find(Access)->second; SmallVector<Instruction *, 4> Insts; - std::transform(IndexVector.begin(), IndexVector.end(), + transform(IndexVector, std::back_inserter(Insts), [&](unsigned Idx) { return this->InstMap[Idx]; }); return Insts; @@ -1823,9 +1823,8 @@ static SmallVector<std::pair<PointerBounds, PointerBounds>, 4> expandBounds( // Here we're relying on the SCEV Expander's cache to only emit code for the // same bounds once. - std::transform( - PointerChecks.begin(), PointerChecks.end(), - std::back_inserter(ChecksWithBounds), + transform( + PointerChecks, std::back_inserter(ChecksWithBounds), [&](const RuntimePointerChecking::PointerCheck &Check) { PointerBounds First = expandBounds(Check.first, L, Loc, Exp, SE, PtrRtChecking), |